結果
問題 | No.207 世界のなんとか |
ユーザー | ns6251 |
提出日時 | 2020-02-25 06:42:00 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 1,069 ms |
コンパイル使用メモリ | 27,904 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-13 07:48:16 |
合計ジャッジ時間 | 1,119 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | WA | - |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 1 ms
5,248 KB |
testcase_17 | AC | 1 ms
5,248 KB |
testcase_18 | AC | 1 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:3:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%ld %ld", &a, &b); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main(){ main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | scanf("%ld %ld", &a, &b); | ^~~~~ main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:7:13: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 7 | printf("%ld\n", a); | ^~~~~~ main.c:7:13: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:7:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:7:13: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:11:9: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration] 11 | sprintf(str, "%ld", a); | ^~~~~~~ main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'sprintf' main.c:11:9: warning: incompatible implicit declaration of built-in function 'sprintf' [-Wbuiltin-declaration-mismatch] main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'sprintf' main.c:14:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 14 | printf("%ld\n", a); | ^~~~~~ main.c:14:17: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
main(){ long a, b; scanf("%ld %ld", &a, &b); for(; a <= b; a++) { if (a % 3 == 0){ printf("%ld\n", a); continue; } char str[16] = {0}; sprintf(str, "%ld", a); for(int i = 0; i < 16; i++) { if(str[i] == '3') { printf("%ld\n", a); } } } }