結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-15 21:30:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 1,266 bytes |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 54,272 KB |
| 最終ジャッジ日時 | 2024-09-30 00:25:30 |
| 合計ジャッジ時間 | 1,677 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
import sys
# import bisect #二分探索
# import math
from collections import deque
from collections import defaultdict
def I():
return int(sys.stdin.readline().rstrip())
def MI():
return map(int, sys.stdin.readline().rstrip().split())
def LI():
return list(map(int, sys.stdin.readline().rstrip().split()))
def LI2():
return list(map(int, sys.stdin.readline().rstrip()))
def S():
return sys.stdin.readline().rstrip()
def LS():
return list(sys.stdin.readline().rstrip().split())
def LS2():
return list(sys.stdin.readline().rstrip())
# 1次元の配列
# list(map(int, input().split()))
# 2次元の配列
# [list(map(int, input().split())) for i in range()]
# wsl pypy3 ファイル名
input = sys.stdin.readline
K = I()
s_list = []
for i in range(1, 3):
for j in range(1, 3):
for k in range(1, 3):
for l in range(1, 3):
comp = "N"+f'{i}' + "U"+f'{j}' + "P"+f'{k}' + "C"+f'{l}'
s = ""
for m in range(8):
if m % 2 == 0:
s += comp[m]
else:
if comp[m] == "2":
s += s
s_list.append(s)
s_list.sort()
print(s_list[K-1])