結果
問題 | No.344 ある無理数の累乗 |
ユーザー | 👑 testestest |
提出日時 | 2016-02-12 23:35:52 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 158 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 05:00:40 |
合計ジャッジ時間 | 957 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
6,812 KB |
testcase_01 | AC | 0 ms
6,940 KB |
testcase_02 | AC | 1 ms
6,948 KB |
testcase_03 | AC | 0 ms
6,940 KB |
testcase_04 | AC | 0 ms
6,944 KB |
testcase_05 | AC | 0 ms
6,940 KB |
testcase_06 | AC | 1 ms
6,944 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | AC | 0 ms
6,940 KB |
testcase_09 | AC | 0 ms
6,944 KB |
testcase_10 | AC | 1 ms
6,940 KB |
testcase_11 | AC | 1 ms
6,940 KB |
testcase_12 | AC | 0 ms
6,940 KB |
testcase_13 | AC | 0 ms
6,944 KB |
testcase_14 | AC | 1 ms
6,940 KB |
testcase_15 | AC | 0 ms
6,944 KB |
testcase_16 | AC | 0 ms
6,940 KB |
testcase_17 | AC | 0 ms
6,940 KB |
testcase_18 | AC | 0 ms
6,944 KB |
testcase_19 | AC | 1 ms
6,944 KB |
testcase_20 | AC | 0 ms
6,940 KB |
testcase_21 | AC | 1 ms
6,940 KB |
testcase_22 | AC | 1 ms
6,940 KB |
testcase_23 | AC | 1 ms
6,944 KB |
testcase_24 | AC | 1 ms
6,944 KB |
testcase_25 | AC | 0 ms
6,940 KB |
testcase_26 | AC | 1 ms
6,940 KB |
testcase_27 | AC | 1 ms
6,940 KB |
testcase_28 | AC | 0 ms
6,940 KB |
testcase_29 | AC | 1 ms
6,940 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | a[600]; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:2:1: warning: data definition has no type or storage class 2 | i; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function ‘main’: main.c:6:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 6 | scanf("%d",&i); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | a[600]; main.c:6:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 6 | scanf("%d",&i); | ^~~~~ main.c:6:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:7:4: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 7 | i=!printf("%d",i==0?1:i==1?2:i==2?7:i==3?20:a[i%600]+~i%2); | ^~~~~~ main.c:7:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:7:4: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:7:4: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
a[600]; i; main(){ a[0]=a[1]=752; for(i=2;i<600;i++)a[i]=(a[i-2]+a[i-1])*2%1000; scanf("%d",&i); i=!printf("%d",i==0?1:i==1?2:i==2?7:i==3?20:a[i%600]+~i%2); }