結果
| 問題 | No.321 (P,Q)-サンタと街の子供たち |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-12-14 03:57:37 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 164 bytes |
| 記録 | |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 21:53:51 |
| 合計ジャッジ時間 | 2,366 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 41 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^
main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘q’ [-Wimplicit-int]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^
main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^
main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^
main.c:1:11: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
| ^~~~
main.c: In function ‘main’:
main.c:1:11: warning: type of ‘f’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:23: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|
ソースコード
s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;p|q?x=y:0;f=x)y=f%x;for(;~scanf("%d%d",&x,&y);s-=f?x%f|y%f||(x+y)/f%(p/f%2*q/f%2+1):x||y);s=!printf("%d",s);}
testestest