結果
問題 |
No.49 算数の宿題
|
ユーザー |
|
提出日時 | 2020-04-14 03:39:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 2,689 ms |
コンパイル使用メモリ | 192,172 KB |
最終ジャッジ日時 | 2025-01-09 18:22:20 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 8 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ string s; cin>>s; stringstream ss(s); int ans=0; char op='+'; while(!ss.eof()){ int a; ss>>a; if(op=='*') ans+=a; else ans*=a; ss>>op; } cout<<ans<<'\n'; return 0; }