Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
432842 许安哲 【C2-3】禁止用7 C++ 通过 100 1 MS 256 KB 506 2026-03-18 17:44:26

Tests(3/3):


#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; }


测评信息: