結果
| 問題 | No.251 大きな桁の復習問題(1) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-02-16 15:28:45 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 517µs | |
| コード長 | 187 bytes |
| 記録 | |
| コンパイル時間 | 47 ms |
| コンパイル使用メモリ | 29,124 KB |
| 実行使用メモリ | 9,884 KB |
| 最終ジャッジ日時 | 2026-10-29 05:35:22 |
| 合計ジャッジ時間 | 1,483 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:161: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | long n,m,t=1,x,y,p=129402307;main(i){for(;i=getchar()-10;x++)n=(n*10+i-38)%p;for(;i=getchar()-10;y+=m)m=(m*10+i-38)%~-p;for(i=27;i--;)t=t*t%p*(m>>i&1?n:1)%p;n=!printf("%d",n?t:x-1?!y:0);}
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | long n,m,t=1,x,y,p=129402307;main(i){for(;i=getchar()-10;x++)n=(n*10+i-38)%p;for(;i=getchar()-10;y+=m)m=(m*10+i-38)%~-p;for(i=27;i--;)t=t*t%p*(m>>i&1?n:1)%p;n=!printf("%d",n?t:x-1?!y:0);}
main.c:1:170: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
1 | long n,m,t=1,x,y,p=129402307;main(i){for(;i=getchar()-10;x++)n=(n*10+i-38)%p;for(;i=getchar()-10;y+=m)m=(m*10+i-38)%~-p;for(i=27;i--;)t=t*t%p*(m>>i&1?n:1)%p;n=!printf("%d",n?t:x-1?!y:0);}
| ~^ ~~~~~~~~~~~~
| | |
| int long int
| %ld
ソースコード
long n,m,t=1,x,y,p=129402307;main(i){for(;i=getchar()-10;x++)n=(n*10+i-38)%p;for(;i=getchar()-10;y+=m)m=(m*10+i-38)%~-p;for(i=27;i--;)t=t*t%p*(m>>i&1?n:1)%p;n=!printf("%d",n?t:x-1?!y:0);}
testestest