結果

問題 No.2671 NUPC Decompressor
コンテスト
ユーザー miya145592
提出日時 2024-03-15 22:02:11
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 325 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 351 ms
コンパイル使用メモリ 85,332 KB
実行使用メモリ 53,972 KB
最終ジャッジ日時 2026-04-16 07:15:16
合計ジャッジ時間 1,466 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools
import sys
input = sys.stdin.readline
K = int(input())
T = []
c = 'NUPC'
for l in itertools.product([1, 2], repeat=4):
    t = []
    for i in range(len(l)):
        t.append(c[i])
        if l[i]==2:
            t.append("".join(t))
    #print(l, t)
    T.append("".join(t))
T.sort()
#print(T)
print(T[K-1])
0