結果

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

ソースコード

diff #
raw source code

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
input = sys.stdin.readline
k = int(input())
ans = []
for i in itertools.product([1,2],repeat=4):
    temp = []
    temp += ['N']
    if i[0] == 2:
        temp += temp[:]
    
    temp += ['U']
    if i[1] == 2:
        temp += temp[:]
    
    temp += ['P']
    if i[2] == 2:
        temp += temp[:]

    temp += ['C']
    if i[3] == 2:
        temp += temp[:]
    ans.append(''.join(temp))
ans.sort()
print(ans[k-1])
0