- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main(){
- string number;
- while(getline(cin, number)){
- if(number == "0")break;
- int l = number.size(), ans = 0;
- for(int i = 0; i < l; i++)ans = (ans*10 + (number[i] - 48)) % 17;
- if(!ans)cout << 1 << endl;
- else cout << 0 << endl;
- }
- return 0;
- }
No comments:
Post a Comment