結果
| 問題 | No.251 大きな桁の復習問題(1) |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-02-16 15:28:26 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| + 533µs | |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 07:06:37 |
| 合計ジャッジ時間 | 2,091 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:163: 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:172: 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