結果
問題 | No.800 四平方定理 |
ユーザー | kotatsugame |
提出日時 | 2019-03-17 23:55:21 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 166 bytes |
コンパイル時間 | 987 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 22,000 KB |
最終ジャッジ日時 | 2024-07-08 07:30:55 |
合計ジャッジ時間 | 2,215 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,940 KB |
testcase_02 | AC | 1 ms
6,944 KB |
testcase_03 | AC | 1 ms
6,944 KB |
testcase_04 | AC | 1 ms
6,944 KB |
testcase_05 | AC | 1 ms
6,940 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,940 KB |
testcase_08 | AC | 2 ms
6,944 KB |
testcase_09 | AC | 1 ms
6,940 KB |
testcase_10 | AC | 13 ms
12,192 KB |
testcase_11 | AC | 13 ms
12,052 KB |
testcase_12 | AC | 14 ms
12,928 KB |
testcase_13 | AC | 11 ms
11,068 KB |
testcase_14 | AC | 12 ms
10,748 KB |
testcase_15 | AC | 15 ms
13,096 KB |
testcase_16 | AC | 12 ms
11,948 KB |
testcase_17 | AC | 13 ms
11,032 KB |
testcase_18 | AC | 17 ms
15,280 KB |
testcase_19 | AC | 15 ms
14,636 KB |
testcase_20 | AC | 1 ms
6,944 KB |
testcase_21 | AC | 1 ms
6,940 KB |
testcase_22 | AC | 15 ms
14,876 KB |
testcase_23 | AC | 38 ms
21,460 KB |
testcase_24 | AC | 32 ms
17,696 KB |
testcase_25 | AC | 36 ms
22,000 KB |
testcase_26 | AC | 1 ms
6,940 KB |
testcase_27 | AC | 1 ms
6,944 KB |
testcase_28 | AC | 27 ms
18,160 KB |
testcase_29 | AC | 29 ms
19,692 KB |
testcase_30 | AC | 26 ms
17,816 KB |
testcase_31 | AC | 22 ms
16,432 KB |
testcase_32 | AC | 26 ms
18,660 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | c[1<<25];i,j,k,t,s; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'c' [-Wimplicit-int] main.c:1:10: warning: data definition has no type or storage class 1 | c[1<<25];i,j,k,t,s; | ^ main.c:1:10: warning: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:12: warning: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] 1 | c[1<<25];i,j,k,t,s; | ^ main.c:1:14: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] 1 | c[1<<25];i,j,k,t,s; | ^ main.c:1:16: warning: type defaults to 'int' in declaration of 't' [-Wimplicit-int] 1 | c[1<<25];i,j,k,t,s; | ^ main.c:1:18: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | c[1<<25];i,j,k,t,s; | ^ main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(n,d){ | ^~~~ main.c: In function 'main': main.c:2:1: warning: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:2:1: warning: type of 'd' defaults to 'int' [-Wimplicit-int] main.c:3:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%d%d",&n,&d); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | c[1<<25];i,j,k,t,s; main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 3 | scanf("%d%d",&n,&d); | ^~~~~ main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:6:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 6 | printf("%d",s); | ^~~~~~ main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:6:9: warning: incompatible implicit dec
ソースコード
c[1<<25];i,j,k,t,s; main(n,d){ scanf("%d%d",&n,&d); for(;i++<n;j=0)for(;j++<n;t>0&&c[t]++)t=i*i-j*j+d; for(;k++<n;j=0)for(;j++<n;)s+=c[k*k+j*j]; printf("%d",s); }