| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81150 | sh25_wangsj | 数字统计 | C++ | 通过 | 0 MS | 188 KB | 328 | 2026-01-04 15:40:06 |
#include <cstdio> int L, R, c, d, ans; int main() { scanf("%d %d", &L, &R); for(int i = L; i <= R; i++) { c = i; while(c != 0) { d = c % 10; c = c / 10; if(d == 2) ans++; } } printf("%d", ans); return 0; }