結果

問題 No.2671 NUPC Decompressor
ユーザー ThetaTheta
提出日時 2024-04-18 17:25:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 432 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-04-18 17:25:42
合計ジャッジ時間 1,734 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,456 KB
testcase_01 AC 36 ms
52,096 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 37 ms
52,096 KB
testcase_04 AC 35 ms
51,584 KB
testcase_05 AC 36 ms
52,096 KB
testcase_06 AC 37 ms
51,840 KB
testcase_07 AC 40 ms
52,096 KB
testcase_08 AC 42 ms
52,196 KB
testcase_09 AC 37 ms
51,712 KB
testcase_10 AC 38 ms
52,480 KB
testcase_11 AC 37 ms
52,096 KB
testcase_12 AC 37 ms
52,352 KB
testcase_13 AC 35 ms
52,480 KB
testcase_14 AC 37 ms
51,584 KB
testcase_15 AC 36 ms
52,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product


def main():
    K = int(input())
    odd = "NUPC"

    compression = []
    for even in product((1, 2), repeat=4):
        sentence = ""
        for letter, i in zip(odd, even):
            sentence += letter
            if i == 2:
                sentence += sentence
        compression.append(sentence)
    compression.sort()
    print(compression[K - 1])


if __name__ == "__main__":
    main()
0