結果
問題 | No.101 ぐるぐる!あみだくじ! |
ユーザー | tails |
提出日時 | 2015-12-10 00:47:09 |
言語 | C90 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 1,105 ms |
コンパイル使用メモリ | 23,628 KB |
実行使用メモリ | 6,068 KB |
最終ジャッジ日時 | 2023-10-13 09:52:07 |
合計ジャッジ時間 | 7,030 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,352 KB |
testcase_01 | AC | 1 ms
4,352 KB |
testcase_02 | AC | 0 ms
4,352 KB |
testcase_03 | TLE | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class a[101],x,y,c; ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:2:8: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] a[101],x,y,c; ^ main.c:2:10: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int] a[101],x,y,c; ^ main.c:2:12: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] a[101],x,y,c; ^ main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] gcd(a,b){return b?gcd(b,a%b):a;} ^~~ main.c: In function ‘gcd’: main.c:3:1: warning: type of ‘a’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘b’ defaults to ‘int’ [-Wimplicit-int] main.c: At top level: main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main(i){ ^~~~ main.c: In function ‘main’: main.c:4:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:5:6: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] for(scanf("%d%d",&x,&y);i=~scanf("%d%d",&x,&y);a[y]=a[x]?a[x]:x,a[x]=i)i=a[y]?a[y]:y; ^~~~~ main.c:5:6: warning: incompatible implicit declaration of built-in function ‘scanf’ main.c:5:6: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:1: +#include <stdio.h> // submissions/63360 - gets(&i) main.c:5:6: for(scanf("%d%d",&x,&y);i=~scanf("%d%d",&x,&y);a[y]=a[x]?a[x]:x,a[x]=i)i=a[y]?a[y]:y; ^~~~~ main.c:7:5: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] x=!printf("%d",x); ^~~~~~ main.c:7:5: warning: incompatible implicit declaration of built-in function ‘printf’ main.c:7:5: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
// submissions/63360 - gets(&i) a[101],x,y,c; gcd(a,b){return b?gcd(b,a%b):a;} main(i){ for(scanf("%d%d",&x,&y);i=~scanf("%d%d",&x,&y);a[y]=a[x]?a[x]:x,a[x]=i)i=a[y]?a[y]:y; for(x=1;a[++i];x*=c/gcd(x,c))for(c=1,y=a[i];y-i;c++)y=a[y]; x=!printf("%d",x); return 0; }