提交时间:2026-03-18 17:44:26
运行 ID: 432842
#include <iostream> #include <string> using namespace std; int main() { string n; // 用字符串存储大数,避免溢出 cin >> n; int count_7 = 0; // 统计数字7的个数 for (char c : n) { // 遍历每个字符 if (c == '7') { count_7++; } } // 输出结果 cout << count_7 << endl; if (count_7 == 0) { cout << "yes" << endl; } else { cout << "no" << endl; } return 0; }