提交时间:2025-08-22 10:45:19

运行 ID: 341140

#include <iostream> using namespace std; int main() { int n; cin >> n; int sum = 0; int temp = n; while (temp > 0) { sum += temp % 10; temp /= 10; } if (sum % 9 == 0) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }