-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA.cpp
30 lines (29 loc) · 849 Bytes
/
A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*************************************************************************
> File Name: A.cpp
> Author: heheql
> Mail: [email protected]
> Created Time: 2017年08月16日 星期三 17时54分11秒
************************************************************************/
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
freopen("input.txt", "r", stdin);
ios::sync_with_stdio(false);
string str;
int num = 0;
while(cin >> str) {
int a = 0, b = 0;
for(int i = 0; i < str.size(); i++) {
a = (a * 10 + str[i] - '0') % 73;
b = (b * 10 + str[i] - '0') % 137;
}
if(a == 0 && b == 0) {
cout << "Case #" << ++num << ": YES" << endl;
} else {
cout << "Case #" << ++num << ": NO" << endl;
}
}
return 0;
}