| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 125298 | 江婉儿 | 简单计算器 | C++ | Accepted | 100 | 0 MS | 244 KB | 384 | 2024-01-23 16:42:25 |
#include<bits/stdc++.h> using namespace std; int main() { int a,c; char b; cin>>a>>b>>c; switch(b) { case '+': cout<<a+c; break; case '-': cout<<a-c; break; case '*': cout<<a*c; break; case '/': if(c==0) cout<<"Divided by zero!"; else cout<<a/c; break; default: cout<<"Invalid operator!"; } return 0; }