#include <iostream>
using namespace std;
signed main() {
string num;
cin >> num;
((num[1] - '0') + (num[2] - '0')) % 7 == 0 && num[0] != '8' ? cout << "Страшила умный" : cout
<< (num[1] - '0') + (num[2] - '0') << " " << num[0];
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
signed main() {
string num;
cin >> num;
((num[1] - '0') + (num[2] - '0')) % 7 == 0 && num[0] != '8' ? cout << "Страшила умный" : cout
<< (num[1] - '0') + (num[2] - '0') << " " << num[0];
}