C :
#include<stdio.h> main(){ int a,b,m; char c,d; scanf("%d%c%d%c",&a,&c,&b,&d); if(c=='+'&&d=='='){ m=a+b; printf("%d\n",m); } }
Python :
str1=input() a=int(str1[:str1.find("+")]) b=int(str1[str1.find("+")+1:-1]) print(a+b)
By signing up a 津桥OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 津桥OJ universal account