結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
vrjfsyi
|
| 提出日時 | 2018-04-10 07:46:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 517 bytes |
| コンパイル時間 | 494 ms |
| コンパイル使用メモリ | 66,688 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 20:52:14 |
| 合計ジャッジ時間 | 1,230 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <map>
#include <stack>
#include <queue>
#include <set>
using namespace std;
bool haveThree(long x) {
while (x != 0) {
if (x % 10 == 3) {
return true;
}
x = x / 10;
}
return false;
}
int main() {
long A, B;
cin >> A >> B;
for (long i = A; i <= B; ++i) {
if (i % 3 == 0 or haveThree(i)) {
cout << i << "\n";
}
}
}
vrjfsyi