Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
86864 sh25_zhoumy 数字统计 C++ 通过 0 MS 248 KB 318 2026-04-10 14:31:38

Tests(1/1):


#include <iostream> using namespace std; int main() { int L, R, ans = 0; cin >> L >> R; for (int i = L; i <= R; i++) { int t = i; while (t > 0) { if (t % 10 == 2) ans++; t /= 10; } } cout << ans << endl; return 0;}


测评信息: