結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2018-03-12 23:46:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 36,676 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 19:05:13 |
合計ジャッジ時間 | 900 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d %d", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <algorithm> #include <deque> using namespace std; using ll = long long; int main() { int a, b, v; scanf("%d %d", &a, &b); for (int i = a; i <= b; i++) { v = i; if (v % 3 == 0) { printf("%d\n", i); continue; } while (v != 0) { if (v % 10 == 3) { printf("%d\n", i); break; } v /= 10; } } }