結果

問題 No.251 大きな桁の復習問題(1)
ユーザー testestesttestestest
提出日時 2015-11-05 11:24:07
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 204 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 24,160 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-11 13:52:26
合計ジャッジ時間 1,099 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,348 KB
testcase_01 AC 0 ms
4,356 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 0 ms
4,348 KB
testcase_04 WA -
testcase_05 AC 0 ms
4,352 KB
testcase_06 WA -
testcase_07 AC 0 ms
4,348 KB
testcase_08 AC 1 ms
4,352 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,352 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,352 KB
testcase_13 AC 2 ms
4,352 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 2 ms
4,352 KB
testcase_16 AC 2 ms
4,352 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,352 KB
testcase_19 AC 2 ms
4,352 KB
testcase_20 AC 1 ms
4,348 KB
testcase_21 AC 1 ms
4,352 KB
testcase_22 AC 1 ms
4,348 KB
testcase_23 AC 0 ms
4,352 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:3:8: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration]
 for(;t=getchar()-10;)n=(n*10+t-38)%p;
        ^~~~~~~
main.c:3:8: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
main.c:1:1:
+#include <stdio.h>
 int main(){
main.c:3:8:
 for(;t=getchar()-10;)n=(n*10+t-38)%p;
        ^~~~~~~
main.c:7:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
 printf("%d",t);
 ^~~~~~
main.c:7:1: warning: incompatible implicit declaration of built-in function ‘printf’
main.c:7:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #

int main(){
long int n=0,m=0,p=129402307,t,i;
for(;t=getchar()-10;)n=(n*10+t-38)%p;
for(;t=getchar()-10;)m=(m*10+t-38)%(p-1);
t=1;
for(i=0;i<27;i++)t=t*t%p*(m>>(26-i)&1?n:1)%p;
printf("%d",t);
return 0;
}
0