1 条题解
-
0
#include<bits/stdc++.h> using namespace std; int main(){ string s,l,k,o; cin>>s; int x=s.find("="); o=s.substr(x+1); int h=0; for(int i=0;i<x-1;i++) { l=s.substr(0,i+1); k=s.substr(i+1,x-1); if(stoi(l)+stoi(k)==stoi(o)) { cout<<stoi(l)<<"+"<<stoi(k)<<"="<<stoi(o); h++; } } if(h==0) cout<<"Impossible!"; return 0; }
- 1
信息
- ID
- 4819
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- 10
- 标签
- (无)
- 递交数
- 1
- 已通过
- 1
- 上传者