結果

問題 No.528 10^9と10^9+7と回文
ユーザー pluto77pluto77
提出日時 2017-06-14 09:03:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 142 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 6,460 KB
最終ジャッジ日時 2023-10-01 00:59:49
合計ジャッジ時間 1,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,852 KB
testcase_01 AC 11 ms
6,092 KB
testcase_02 AC 11 ms
6,008 KB
testcase_03 AC 11 ms
5,944 KB
testcase_04 AC 11 ms
6,004 KB
testcase_05 AC 11 ms
6,068 KB
testcase_06 AC 11 ms
5,932 KB
testcase_07 AC 11 ms
5,864 KB
testcase_08 AC 11 ms
6,104 KB
testcase_09 AC 11 ms
5,880 KB
testcase_10 AC 31 ms
6,316 KB
testcase_11 AC 32 ms
6,324 KB
testcase_12 AC 32 ms
6,324 KB
testcase_13 AC 32 ms
6,328 KB
testcase_14 AC 19 ms
6,184 KB
testcase_15 AC 18 ms
6,196 KB
testcase_16 AC 17 ms
6,292 KB
testcase_17 AC 15 ms
6,188 KB
testcase_18 AC 30 ms
6,340 KB
testcase_19 AC 13 ms
6,132 KB
testcase_20 AC 21 ms
6,252 KB
testcase_21 AC 15 ms
6,156 KB
testcase_22 AC 11 ms
5,860 KB
testcase_23 AC 11 ms
6,124 KB
testcase_24 AC 12 ms
6,064 KB
testcase_25 AC 12 ms
5,984 KB
testcase_26 AC 32 ms
6,460 KB
testcase_27 AC 32 ms
6,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_528

s=raw_input()
n=len(s)
m=(n+1)//2
res=int(s[:m])+10**(n/2)-1
if s[:n/2][::-1]>s[m:]:
 res-=1
print res%(10**9)
print res%(10**9+7)
0