結果

問題 No.2246 1333-like Number
ユーザー okapin
提出日時 2023-03-17 21:31:45
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 255 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 81,608 KB
実行使用メモリ 137,892 KB
最終ジャッジ日時 2024-09-18 10:18:32
合計ジャッジ時間 3,839 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
n = int(input())
q = deque([i for i in range(10, 100) if int(str(i)[0]) < int(str(i)[1])])
res = []

while q and len(res) < n:
    x = q.popleft()
    res.append(x)
    y = x*10+int(str(x)[-1])
    q.append(y)

print(res[-1])
0