結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-15 22:25:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 481 ms |
| コンパイル使用メモリ | 23,296 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 09:23:36 |
| 合計ジャッジ時間 | 852 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:14:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | i64 a, b; scanf("%lld%lld", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
using namespace std;
using i64 = long long;
bool check(i64 n) {
if(n % 3 == 0) { return 1; }
for( ; n>0; n/=10) {
if(n%10 == 3) { return 1; }
}
return 0;
}
int main(void) {
i64 a, b; scanf("%lld%lld", &a, &b);
for(i64 i=a; i<=b; i++) {
if(check(i)) { printf("%lld\n", i); }
}
return 0;
}