結果

問題 No.2595 Parsing Challenge
ユーザー Shirotsume
提出日時 2023-12-23 00:13:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 441 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 82,436 KB
実行使用メモリ 490,084 KB
最終ジャッジ日時 2024-09-27 11:41:16
合計ジャッジ時間 12,156 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 5 WA * 5 RE * 20 TLE * 1 -- * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
sys.setrecursionlimit(10 ** 6 + 5)

n = ii()
s = input()

t = []

for v in s:
    if t and t[-1] =='-' and v == '-':
        t.pop()
        continue
    t.append(v)
t = ''.join(t)
print(eval(t))
0