結果
| 問題 |
No.2671 NUPC Decompressor
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-13 22:32:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 305 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 82,352 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-09-29 23:37:38 |
| 合計ジャッジ時間 | 1,867 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
#!/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])