結果
問題 | No.49 算数の宿題 |
ユーザー |
👑 ![]() |
提出日時 | 2020-06-10 20:53:28 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 5,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 51,968 KB |
最終ジャッジ日時 | 2024-12-23 02:10:37 |
合計ジャッジ時間 | 1,464 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
S=input() N=len(S) S="*"+S T=0 U="0" p=0 f=0 for s in S: if s=="*" or s=="+": f=1 else: U+=s if f: if p==0: T+=int(U) else: T*=int(U) U="" f=0 if s=="*":p=0 else: p=1 if p==0: T+=int(U) else: T*=int(U) print(T)