結果
問題 | No.701 ひとりしりとり |
ユーザー | vwxyz |
提出日時 | 2024-04-13 15:46:50 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 438 ms |
コンパイル使用メモリ | 82,400 KB |
実行使用メモリ | 196,832 KB |
最終ジャッジ日時 | 2024-04-13 15:47:05 |
合計ジャッジ時間 | 14,016 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
ソースコード
N=int(input()) queue={"a":[],"b":[]} for bit in range(1,1<<20): S="" for i in range(20): if bit&1<<i: S+="a" else: S+="b" queue[S[0]].append(S) ans="a" for n in range(N): if n==N-1: ans=ans[:-1]+"n" break print(ans) ans=queue[ans[-1]].pop()