@[ACworld](/user/1040131) 你把 a 捆到 stdin 了吗?
by 035966_L3 @ 2024-04-22 13:11:41
看起来string并不能通过scanf输入
by TallBanana @ 2024-04-22 13:14:46
直接单个输入不香吗?
如:
```cpp
int t,a,b,c;
char s;
cin>>a>>s>>b>>s>>c;
```
by youth191954 @ 2024-04-22 14:03:49
总结一下:
这就是最终的答案
AC code:
```cpp
#include<iostream>
using namespace std;
int t,a,b,c;
char s;
int main(){
cin>>t;
while(t--){
cin>>a>>s>>b>>s>>c;
if(a+b==c)cout<<"Right!"<<endl;
else cout<<"Wrong!"<<endl;
}
return 0;
}
```
呵呵呵!!!
by youth191954 @ 2024-04-22 14:07:58
@[youth191954](/user/965313) 甚至可以这么写
```cpp
scanf("%d+%d=%d", &a, &b, &c);
```
by _d_h_f @ 2024-04-22 15:01:39
@[_d_h_f](/user/1057109) 这个确实好用,谢谢
by ysh54188 @ 2024-04-22 21:45:53