結果
問題 |
No.207 世界のなんとか
|
ユーザー |
|
提出日時 | 2017-12-05 11:22:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 621 bytes |
コンパイル時間 | 687 ms |
コンパイル使用メモリ | 60,696 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-28 16:32:05 |
合計ジャッジ時間 | 1,553 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 10 |
ソースコード
#include <iostream> #include <cmath> int main() { int A, B; int digit = 1; int elem; std::cin >> A >> B; for (digit = 1; digit <= 11; digit++) { if (B <= (int)pow(10, digit)) break; } for (int i = A; i <= B; i++) { if (i % 3 == 0) { std::cout << i << std::endl; } else { for (int j = 1; j <= digit; j++) { if (j == 1) elem = i % 10; else elem = (i / (int)pow(10, j-1)) % 10; if (elem == 3) std::cout << i << std::endl; } } } return 0; }