結果
問題 | No.860 買い物 |
ユーザー | kotatsugame |
提出日時 | 2019-08-09 23:58:08 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 122 bytes |
コンパイル時間 | 438 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 16:01:31 |
合計ジャッジ時間 | 1,639 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 25 ms
5,376 KB |
testcase_08 | AC | 25 ms
5,376 KB |
testcase_09 | AC | 25 ms
5,376 KB |
testcase_10 | AC | 24 ms
5,376 KB |
testcase_11 | AC | 21 ms
5,376 KB |
testcase_12 | AC | 21 ms
5,376 KB |
testcase_13 | AC | 24 ms
5,376 KB |
testcase_14 | AC | 25 ms
5,376 KB |
testcase_15 | AC | 15 ms
5,376 KB |
testcase_16 | AC | 22 ms
5,376 KB |
testcase_17 | AC | 26 ms
5,376 KB |
コンパイルメッセージ
main.c:1:10: warning: data definition has no type or storage class 1 | long a,b;i; | ^ main.c:1:10: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(C,D){ | ^~~~ main.c: In function 'main': main.c:2:1: warning: type of 'C' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'D' defaults to 'int' [-Wimplicit-int] main.c:3:13: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | for(scanf("%*d");~scanf("%d%d",&C,&D);b=fmin(i++?b+D:a,a)+C)a=fmin(a+C+D,b+C); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | long a,b;i; main.c:3:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | for(scanf("%*d");~scanf("%d%d",&C,&D);b=fmin(i++?b+D:a,a)+C)a=fmin(a+C+D,b+C); | ^~~~~ main.c:3:13: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:49: warning: implicit declaration of function 'fmin' [-Wimplicit-function-declaration] 3 | for(scanf("%*d");~scanf("%d%d",&C,&D);b=fmin(i++?b+D:a,a)+C)a=fmin(a+C+D,b+C); | ^~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'fmin' +++ |+#include <math.h> 1 | long a,b;i; main.c:3:49: warning: incompatible implicit declaration of built-in function 'fmin' [-Wbuiltin-declaration-mismatch] 3 | for(scanf("%*d");~scanf("%d%d",&C,&D);b=fmin(i++?b+D:a,a)+C)a=fmin(a+C+D,b+C); | ^~~~ main.c:3:49: note: include '<math.h>' or provide a declaration of 'fmin' main.c:4:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 4 | printf("%ld",b); | ^~~~~~ main.c:4:9: note: includ
ソースコード
long a,b;i; main(C,D){ for(scanf("%*d");~scanf("%d%d",&C,&D);b=fmin(i++?b+D:a,a)+C)a=fmin(a+C+D,b+C); printf("%ld",b); }