結果
問題 | No.2560 A_1 < A_2 < ... < A_N |
ユーザー | wotsushi |
提出日時 | 2023-12-08 19:08:54 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 139 bytes |
コンパイル時間 | 978 ms |
コンパイル使用メモリ | 28,288 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-27 02:58:00 |
合計ジャッジ時間 | 2,435 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 16 ms
5,376 KB |
testcase_02 | AC | 18 ms
5,376 KB |
testcase_03 | AC | 16 ms
5,376 KB |
testcase_04 | AC | 19 ms
5,376 KB |
testcase_05 | AC | 19 ms
5,376 KB |
testcase_06 | AC | 32 ms
5,376 KB |
testcase_07 | AC | 32 ms
5,376 KB |
testcase_08 | AC | 32 ms
5,376 KB |
testcase_09 | AC | 32 ms
5,376 KB |
testcase_10 | AC | 32 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 2 ms
5,376 KB |
testcase_13 | AC | 1 ms
5,376 KB |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 2 ms
5,376 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'N' [-Wimplicit-int] main.c:1:3: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^ main.c:1:5: warning: return type defaults to 'int' [-Wimplicit-int] 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^~~~ main.c: In function 'main': main.c:1:18: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^~~~ main.c:1:33: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} main.c:1:33: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}} | ^~~~~ main.c:1:33: note: include '<stdio.h>' or provide a declaration
ソースコード
N,i;main(long X){gets(&i);for(;~scanf("%d%ld",&N,&X);){if(N>=2*X/N)puts("-1");else{for(i=0;--N;X-=i)printf("%d ",++i);printf("%ld\n",X);}}}