| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 323503 | 孙一铭 | [ 2014年绍兴市第十二届少儿信息学竞赛复赛 ] - 报数游戏 | C++ | Accepted | 100 | 2 MS | 256 KB | 281 | 2025-05-18 12:30:46 |
#include <iostream> #include <cstdio> using namespace std; int main(){ int n, a, b; cin >> n >> a >> b; int sum = 0; for (int i = 1; i <= n; i++){ int x = (i - 1) % a + 1; int y = (i - 1) % b + 1; if (x == y) sum++; } cout << sum << endl; return 0; }