結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,412 KB
testcase_01 AC 2 ms
4,540 KB
testcase_02 AC 2 ms
4,488 KB
testcase_03 AC 3 ms
4,428 KB
testcase_04 AC 3 ms
4,488 KB
testcase_05 AC 2 ms
4,492 KB
testcase_06 AC 2 ms
4,484 KB
testcase_07 AC 2 ms
4,544 KB
testcase_08 AC 2 ms
4,404 KB
testcase_09 AC 3 ms
4,520 KB
testcase_10 AC 178 ms
4,512 KB
testcase_11 AC 180 ms
4,592 KB
testcase_12 AC 180 ms
4,640 KB
testcase_13 AC 179 ms
4,700 KB
testcase_14 AC 108 ms
4,644 KB
testcase_15 AC 95 ms
4,644 KB
testcase_16 AC 88 ms
4,652 KB
testcase_17 AC 73 ms
4,644 KB
testcase_18 AC 172 ms
4,640 KB
testcase_19 AC 51 ms
4,620 KB
testcase_20 AC 125 ms
4,552 KB
testcase_21 AC 73 ms
4,532 KB
testcase_22 AC 3 ms
4,416 KB
testcase_23 AC 3 ms
4,432 KB
testcase_24 AC 4 ms
4,484 KB
testcase_25 AC 20 ms
4,536 KB
testcase_26 AC 178 ms
4,688 KB
testcase_27 AC 178 ms
4,636 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 5.
Main.pl syntax OK

ソースコード

diff #

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