結果

問題 No.528 10^9と10^9+7と回文
ユーザー pluto77
提出日時 2017-06-14 09:03:16
言語 Python2
(2.7.18)
結果
AC  
実行時間 29 ms / 1,000 ms
コード長 142 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-23 18:34:23
合計ジャッジ時間 1,709 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

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