結果
問題 | No.152 貯金箱の消失 |
ユーザー | testestest |
提出日時 | 2016-06-02 05:51:43 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 16 ms / 5,000 ms |
コード長 | 170 bytes |
コンパイル時間 | 891 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-08 05:22:36 |
合計ジャッジ時間 | 840 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 0 ms
5,248 KB |
testcase_03 | AC | 0 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 1 ms
5,248 KB |
testcase_07 | AC | 3 ms
5,248 KB |
testcase_08 | AC | 16 ms
5,248 KB |
testcase_09 | AC | 16 ms
5,248 KB |
testcase_10 | AC | 12 ms
5,248 KB |
testcase_11 | AC | 7 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n,m,L,s; | ^ 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 ‘m’ [-Wimplicit-int] 1 | n,m,L,s; | ^ main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘L’ [-Wimplicit-int] 1 | n,m,L,s; | ^ main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int] 1 | n,m,L,s; | ^ main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | cop(n,m){return m?cop(m,n%m):n==1;} | ^~~ main.c: In function ‘cop’: main.c:2:1: warning: type of ‘n’ defaults to ‘int’ [-Wimplicit-int] main.c:2:1: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c: At top level: main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function ‘main’: main.c:4:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 4 | scanf("%d",&L); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | n,m,L,s; main.c:4:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 4 | scanf("%d",&L); | ^~~~~ main.c:4:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:7:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 7 | printf("%d",s); | ^~~~~~ main.c:7:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:7:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:7:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
n,m,L,s; cop(n,m){return m?cop(m,n%m):n==1;} main(){ scanf("%d",&L); L/=4; for(m=2;m*m<=L;m++)for(n=m-1;n>0;n-=2)s+=n<=L/2/m-m&&cop(n,m); printf("%d",s); return 0; }