結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,928 KB
testcase_01 AC 15 ms
7,824 KB
testcase_02 AC 15 ms
7,884 KB
testcase_03 AC 15 ms
7,780 KB
testcase_04 AC 15 ms
7,764 KB
testcase_05 AC 16 ms
7,864 KB
testcase_06 AC 16 ms
7,776 KB
testcase_07 AC 16 ms
7,836 KB
testcase_08 AC 15 ms
7,764 KB
testcase_09 AC 15 ms
7,800 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 15 ms
7,864 KB
testcase_23 AC 15 ms
7,816 KB
testcase_24 AC 16 ms
7,792 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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