結果

問題 No.2671 NUPC Decompressor
ユーザー miho-4miho-4
提出日時 2024-03-15 21:30:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 53,204 KB
最終ジャッジ日時 2024-09-30 00:25:43
合計ジャッジ時間 1,260 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

k=int(input())
S=set()
L=[["N",a,"U",b,"P",c,"C",d] for a in range(1,3) for b in range(1,3) for c in range(1,3) for d in range(1,3)]

for s in L:
  t=""
  for i in range(8):
    if i%2==0:
      t+=s[i]
    else:
      if s[i]==2:
        t=t+t
  S.add(t)
    
ans=sorted(list(S))
print(ans[k-1])
0