Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
315931 黄浙峰老师 【C5-T】表达式的值 C++ 通过 100 1 MS 252 KB 274 2025-04-05 13:30:25

Tests(3/3):


#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int a,b,c,p1,p2; p1=s.find("+"); p2=s.find(")"); a=atoi(s.substr(1,p1).c_str()); b=atoi(s.substr(p1+1,p2).c_str()); c=atoi(s.substr(p2+2).c_str()); cout<<(a+b)*c; return 0; }


测评信息: