結果
| 問題 | No.251 大きな桁の復習問題(1) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-03-20 06:27:30 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 164 bytes |
| 記録 | |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 29,252 KB |
| 最終ジャッジ日時 | 2026-02-23 20:58:40 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 1 |
コンパイルメッセージ
main.c:1:22: warning: data definition has no type or storage class
1 | long t=1,p=129402307;f,b,c,s;main(a){for(;read(0,&c,1);c-10?b=(b*10+c-48)%(p-f),s+=b*f:!f++?a=b,b=0:0);for(c=27;c--;)t=t*t%p*(b>>c&1?a:1)%p;c=!printf("%d",a?t:!s);}
| ^
main.c: In function ‘main’:
main.c:1:144: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | long t=1,p=129402307;f,b,c,s;main(a){for(;read(0,&c,1);c-10?b=(b*10+c-48)%(p-f),s+=b*f:!f++?a=b,b=0:0);for(c=27;c--;)t=t*t%p*(b>>c&1?a:1)%p;c=!printf("%d",a?t:!s);}
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | long t=1,p=129402307;f,b,c,s;main(a){for(;read(0,&c,1);c-10?b=(b*10+c-48)%(p-f),s+=b*f:!f++?a=b,b=0:0);for(c=27;c--;)t=t*t%p*(b>>c&1?a:1)%p;c=!printf("%d",a?t:!s);}
main.c:1:153: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
1 | long t=1,p=129402307;f,b,c,s;main(a){for(;read(0,&c,1);c-10?b=(b*10+c-48)%(p-f),s+=b*f:!f++?a=b,b=0:0);for(c=27;c--;)t=t*t%p*(b>>c&1?a:1)%p;c=!printf("%d",a?t:!s);}
| ~^ ~~~~~~
| | |
| int long int
|
ソースコード
long t=1,p=129402307;f,b,c,s;main(a){for(;read(0,&c,1);c-10?b=(b*10+c-48)%(p-f),s+=b*f:!f++?a=b,b=0:0);for(c=27;c--;)t=t*t%p*(b>>c&1?a:1)%p;c=!printf("%d",a?t:!s);}
testestest