結果
| 問題 | No.207 世界のなんとか |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-09 01:21:19 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 242µs | |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 751 ms |
| コンパイル使用メモリ | 179,136 KB |
| 実行使用メモリ | 9,832 KB |
| 最終ジャッジ日時 | 2026-09-25 05:40:52 |
| 合計ジャッジ時間 | 2,116 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
bool check(int x) {
int sum = 0;
while (x) {
sum += x % 10;
if (x % 10 == 3) return true;
x /= 10;
}
return sum % 3 == 0;
}
int main(void) {
int a, b;
cin >> a >> b;
for (int i = a; i <= b; i++) {
if (!check(i)) continue;
cout << i << endl;
}
return 0;
}