結果

問題 No.251 大きな桁の復習問題(1)
コンテスト
ユーザー testestest
提出日時 2016-03-20 06:27:30
言語 C90
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 164 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 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
      |                                                                                                                                            

ソースコード

diff #
raw source code

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);}
0