結果

問題 No.2671 NUPC Decompressor
コンテスト
ユーザー Theta
提出日時 2024-04-18 17:25:40
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 26 ms / 2,000 ms
+ 346µs
コード長 432 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 83 ms
コンパイル使用メモリ 81,280 KB
実行使用メモリ 54,784 KB
最終ジャッジ日時 2026-09-13 04:11:12
合計ジャッジ時間 2,072 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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