結果
| 問題 | No.321 (P,Q)-サンタと街の子供たち |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-02-03 09:23:19 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| + 183µs | |
| コード長 | 158 bytes |
| 記録 | |
| コンパイル時間 | 70 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 06:41:24 |
| 合計ジャッジ時間 | 3,261 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;x=y;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:23: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;x=y;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: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;x=y;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:143: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;x=y;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:143: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
s,p,q,x,y;main(f){for(scanf("%d%d%d",&p,&q,&s),y=p,f=q;x=y;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