結果

問題 No.528 10^9と10^9+7と回文
ユーザー tailstails
提出日時 2017-06-10 01:30:59
言語 Perl
(5.38.2)
結果
AC  
実行時間 180 ms / 1,000 ms
コード長 168 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 4,644 KB
最終ジャッジ日時 2023-10-01 00:56:48
合計ジャッジ時間 3,044 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,524 KB
testcase_01 AC 2 ms
4,504 KB
testcase_02 AC 2 ms
4,584 KB
testcase_03 AC 3 ms
4,596 KB
testcase_04 AC 2 ms
4,488 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 AC 2 ms
4,552 KB
testcase_07 AC 3 ms
4,588 KB
testcase_08 AC 3 ms
4,540 KB
testcase_09 AC 2 ms
4,496 KB
testcase_10 AC 180 ms
4,616 KB
testcase_11 AC 177 ms
4,584 KB
testcase_12 AC 177 ms
4,500 KB
testcase_13 AC 178 ms
4,620 KB
testcase_14 AC 106 ms
4,544 KB
testcase_15 AC 94 ms
4,608 KB
testcase_16 AC 88 ms
4,636 KB
testcase_17 AC 73 ms
4,452 KB
testcase_18 AC 169 ms
4,616 KB
testcase_19 AC 50 ms
4,612 KB
testcase_20 AC 124 ms
4,552 KB
testcase_21 AC 72 ms
4,600 KB
testcase_22 AC 2 ms
4,584 KB
testcase_23 AC 3 ms
4,448 KB
testcase_24 AC 4 ms
4,544 KB
testcase_25 AC 20 ms
4,532 KB
testcase_26 AC 178 ms
4,528 KB
testcase_27 AC 176 ms
4,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 5.
Main.pl syntax OK

ソースコード

diff #

sub n($){substr$_,"@_",1}
$_=<>;$l=y///c-2;
for$m(1e9,1e9+7){
	for$i(($r=0)..$l/2){
		$r=($r.($i>0|$l&1)*9+n$i)%$m;
		$f=n$i<=>n$l-$i||$f;
	}
	print+($r-=$f>0)%$m,$/;
}
0