結果
| 問題 | No.152 貯金箱の消失 |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-06-02 05:51:43 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 5,000 ms |
| コード長 | 170 bytes |
| 記録 | |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 29,896 KB |
| 最終ジャッジ日時 | 2026-02-23 21:26:24 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | n,m,L,s;
| ^
main.c: In function ‘main’:
main.c:4:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
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:7:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
7 | printf("%d",s);
| ^~~~~~
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;
}
testestest