結果
| 問題 | No.8126 Brainfxxk easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-01 21:33:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 379 bytes |
| 記録 | |
| コンパイル時間 | 337 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 139,136 KB |
| 最終ジャッジ日時 | 2026-04-01 21:33:24 |
| 合計ジャッジ時間 | 938 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
from collections import defaultdict as dd
n=int(input())
S=input()
d=dd(int)
a=0
for s in S:
if s=='<':
a-=1
if a==-1:
print('error')
exit()
elif s=='>':
a+=1
if a==n:
print('error')
exit()
elif s=='+':
d[a]+=1
else:
d[a]-=1
for i in range(n):
print(d[i],end=' ')