結果
| 問題 |
No.2246 1333-like Number
|
| コンテスト | |
| ユーザー |
n_na
|
| 提出日時 | 2023-03-17 23:15:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 389 bytes |
| コンパイル時間 | 196 ms |
| コンパイル使用メモリ | 81,876 KB |
| 実行使用メモリ | 237,312 KB |
| 最終ジャッジ日時 | 2024-09-18 12:18:51 |
| 合計ジャッジ時間 | 3,810 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 TLE * 1 -- * 22 |
ソースコード
from collections import deque
N = int(input())
deq = deque()
cnt = 0
for a in range(1,9):
for b in range(a+1,10):
deq.append((10*a + b, b))
cnt += 1
if N <= cnt:
print(deq[N-1][0])
else:
while cnt < N:
a,b = deq.popleft()
X = 10*a + b
deq.append((X,b))
cnt += 1
if cnt == N:
print(X)
break
n_na