結果

問題 No.528 10^9と10^9+7と回文
ユーザー arukukaarukuka
提出日時 2017-06-10 10:32:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 117 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 8,372 KB
最終ジャッジ日時 2023-10-01 00:57:30
合計ジャッジ時間 1,820 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,780 KB
testcase_01 AC 17 ms
7,832 KB
testcase_02 AC 17 ms
7,784 KB
testcase_03 AC 16 ms
7,812 KB
testcase_04 AC 16 ms
7,924 KB
testcase_05 AC 15 ms
7,868 KB
testcase_06 AC 15 ms
7,800 KB
testcase_07 AC 15 ms
7,792 KB
testcase_08 AC 16 ms
7,924 KB
testcase_09 AC 16 ms
7,848 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 16 ms
7,808 KB
testcase_23 AC 16 ms
7,836 KB
testcase_24 AC 17 ms
7,812 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
n=len(s)
m=(n+1)//2
for d in [1e9,1e9+7]:
	print((int(s[:m])+pow(10,n//2)-1-(s[:n//2][::-1]>s[m:]))%int(d))
0