求指教,为什么我在洛谷提交是满分,在NOI上显示0分
查看原帖
求指教,为什么我在洛谷提交是满分,在NOI上显示0分
504561
jcy2008楼主2021/4/1 11:00

#include<bits/stdc++.h> using namespace std; void work(double a,double b,double c){ if(a==0&&b==0||a==0&&c==0||b==0&&c==0) cout<<0<<endl; else if(a==0||b==0||c==0){ if(a==b||a==c||b==c) cout<<1<<endl; else cout<<2<<endl; } else{ double A=a/(a+b+c)*360,B=b/(a+b+c)*360,C=c/(a+b+c)*360; if(A==180||B==180||C==180||a==b||a==c||b==c) cout<<2<<endl; else cout<<3<<endl; } } int main(){ int T; double a,b,c; cin>>T; for(int i=1;i<=T;i++){ cin>>a>>b>>c; work(a,b,c); } return 0; }

2021/4/1 11:00
加载中...