結果
問題 | No.49 算数の宿題 |
ユーザー | nohakai3 |
提出日時 | 2022-10-22 20:53:36 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 211 bytes |
コンパイル時間 | 1,384 ms |
コンパイル使用メモリ | 86,692 KB |
実行使用メモリ | 79,088 KB |
最終ジャッジ日時 | 2023-08-24 17:52:25 |
合計ジャッジ時間 | 2,306 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
71,384 KB |
testcase_01 | AC | 71 ms
70,884 KB |
testcase_02 | AC | 71 ms
71,164 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
ソースコード
l=list(input()) ans="((" for i in range(len(l)): if l[i]=="+": ans+="))*(" elif l[i]=="*": ans+=")+(" else: ans+=l[i] ans+=")"*(ans.count("(")-ans.count(")")) print(eval(ans))