結果

問題 No.2595 Parsing Challenge
ユーザー Shirotsume
提出日時 2023-12-23 00:08:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 348,196 KB
最終ジャッジ日時 2024-09-27 11:41:04
合計ジャッジ時間 19,235 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 5 WA * 10 RE * 40
権限があれば一括ダウンロードができます

ソースコード

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


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