秋祭 | 静岡高校工学部



卬高杯


提出詳細

提出id提出時刻ユーザー名問題言語判定状況判定実行時間
1147462023-10-24 07:33:33nouka28Fpython18/18AC42

from collections import deque
a=deque()
q=int(input())
for i in range(q):
    qu=list(input().split())
    if len(qu)==2:
        a.append(qu[1])
    else:
        if len(a)==0:print("何もなくてごめんね")
        elif len(a)==1:print(a.popleft()+"しかなかったんだけどいいかな")
        else:print(a.popleft()+"だけどいいかな")
print(len(a))