結果
| 問題 |
No.1764 Square
|
| コンテスト | |
| ユーザー |
player
|
| 提出日時 | 2024-01-05 01:35:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 45 ms / 2,000 ms |
| コード長 | 583 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 81,900 KB |
| 実行使用メモリ | 55,108 KB |
| 最終ジャッジ日時 | 2024-09-27 18:56:35 |
| 合計ジャッジ時間 | 1,209 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
from collections import *
k = int(input())
q0,q1,q2,q3 = deque(),deque(),deque(),deque()
q0.append("A")
q0.append("E")
q1.append("B")
q2.append("C")
q3.append("D")
for i in range(k):
if i%4 == 0:
now = q0.popleft()
q1.append(now)
elif i%4 == 1:
now = q1.popleft()
q2.append(now)
elif i%4 == 2:
now = q2.popleft()
q3.append(now)
else:
now = q3.popleft()
q0.append(now)
ans1 = "".join(q0)
ans2 = "".join(q1)
ans3 = "".join(q2)
ans4 = "".join(q3)
print(ans1)
print(ans2)
print(ans3)
print(ans4)
player