結果
| 問題 | No.321 (P,Q)-サンタと街の子供たち |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2015-12-14 01:14:32 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 165 bytes |
| 記録 | |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 29,348 KB |
| 最終ジャッジ日時 | 2026-02-23 20:03:00 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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=p,f=q;p|q?x=s:0;f=x)s=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=p,f=q;p|q?x=s:0;f=x)s=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=p,f=q;p|q?x=s:0;f=x)s=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:150: 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=p,f=q;p|q?x=s:0;f=x)s=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:150: 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=p,f=q;p|q?x=s:0;f=x)s=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