結果
| 問題 | No.8126 Brainfxxk easy |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-04-01 21:40:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 85,228 KB |
| 実行使用メモリ | 138,156 KB |
| 最終ジャッジ日時 | 2026-04-01 21:40:14 |
| 合計ジャッジ時間 | 1,374 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
N = int(input())
S = input()
ans = [0]*N
idx = 0
for s in S:
if s == "+":
ans[idx] += 1
elif s == "-":
ans[idx] -= 1
elif s == ">":
idx += 1
else:
idx -= 1
if not 0 <= idx < N:
print("error")
break
else:
print(*ans)
detteiuu