結果

問題 No.528 10^9と10^9+7と回文
ユーザー %20%20
提出日時 2017-06-10 00:35:34
言語 Perl
(5.38.2)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 274 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 18,816 KB
最終ジャッジ日時 2024-04-18 23:39:25
合計ジャッジ時間 2,886 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,400 KB
testcase_01 AC 14 ms
6,272 KB
testcase_02 AC 14 ms
6,400 KB
testcase_03 AC 14 ms
6,400 KB
testcase_04 AC 13 ms
6,400 KB
testcase_05 AC 13 ms
6,272 KB
testcase_06 AC 13 ms
6,400 KB
testcase_07 AC 13 ms
6,400 KB
testcase_08 AC 13 ms
6,400 KB
testcase_09 AC 15 ms
6,272 KB
testcase_10 AC 79 ms
18,688 KB
testcase_11 AC 83 ms
18,688 KB
testcase_12 AC 82 ms
18,816 KB
testcase_13 AC 82 ms
18,688 KB
testcase_14 AC 46 ms
13,312 KB
testcase_15 AC 39 ms
12,416 KB
testcase_16 AC 37 ms
11,776 KB
testcase_17 AC 33 ms
10,752 KB
testcase_18 AC 78 ms
18,048 KB
testcase_19 AC 27 ms
8,960 KB
testcase_20 AC 54 ms
14,592 KB
testcase_21 AC 33 ms
10,752 KB
testcase_22 AC 13 ms
6,400 KB
testcase_23 AC 14 ms
6,400 KB
testcase_24 AC 14 ms
6,400 KB
testcase_25 AC 17 ms
6,784 KB
testcase_26 AC 81 ms
18,688 KB
testcase_27 AC 49 ms
18,432 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$"='';
$b=($a=1e9)+7;
@N=<>=~/./g;
$K=@N;
$t+="@N[0..$K-1>>1,reverse 0..($K>>1)-1]"le"@N";
--$N[0];
$h="@N[0..$K-1>>1]"=~s/^0*\B//r;
exec"python2x -c'
print (pow(10,($K-1)//2,$a)+pow(10,$K//2,$a)+$t+$a-2+$h)%$a
print (pow(10,($K-1)//2,$b)+pow(10,$K//2,$b)+$t+$b-2+$h)%$b
'"
0