結果

問題 No.2671 NUPC Decompressor
ユーザー nu50218
提出日時 2024-03-13 20:55:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 305 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 53,944 KB
最終ジャッジ日時 2024-09-29 23:06:35
合計ジャッジ時間 1,295 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python3

k = int(input())

n = 4

decompressed = []
nupc = ['N', 'U', 'P', 'C']

for i in range(2 ** n):
    tmp = ""
    for j in range(n):
        tmp += nupc[j]
        if i & (1 << j):
            tmp = tmp + tmp
    decompressed.append(tmp)

decompressed.sort()

print(decompressed[k - 1])
0