結果

問題 No.491 10^9+1と回文
ユーザー 💕💖💞💕💖💞
提出日時 2017-04-01 20:57:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 370 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-07-07 19:03:17
合計ジャッジ時間 2,892 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 102
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

def check(target):
  buf = str(target)
  mid = len(buf)//2
  head = buf[:mid]
  tail = reversed(buf[mid:])
  zipped = all(list(map(lambda x:x[0]==x[1], zip(head, tail))))
  return zipped
base = 1000000001
mag = 1
checked = 0
while True:
  target = mag*base
  if N < target:
    break
  if check(target) == True:
    checked += 1
  mag+=1
print(checked)
0