正解:
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; cout<<180-a-b; return 0; }
下面那几个干错解的你有良心吗(
显然,数据出锅了。错解(AC代码)如下:
#include<bits/stdc++.h> #define int long long #define INF 0x3f3f3f using namespace std; int x,y; signed main(){ cin>>x>>y; if(180-x-y==40)cout<<"40s"; else cout<<180-x-y; return 0; }
好心的出题人让数据出现了bug,答案是40他跟我说要输出40s,但是高手从不抱怨,咱们只要特判就能AK了! 代码:
#include<bits/stdc++.h>
using namespace std;
int n,m;
int main(){
cin>>n>>m; if(180-n-m==40) cout<<40<<"s"; else cout<<180-n-m; return 0;
}
题面有误++
#include<bits/stdc++.h> using namespace std; signed main(){ int a,b; cin>>a>>b; cout<<180-a-b; }
AC CODE(非正解)
#include<bits/stdc++.h> using namespace std; signed main(){ int a,b; cin>>a>>b; if(180-a-b==40)cout<<"40s"; else cout<<180-a-b; }
注册一个 Hydro 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 Hydro 通用账户