4 条题解

  • 0
    @ 2025-1-5 8:32:00

    正解:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b;
    	cin>>a>>b;
    	cout<<180-a-b;
    	return 0;
    }
    

    下面那几个干错解的你有良心吗(

    • 0
      @ 2024-12-29 16:29:27

      显然,数据出锅了。错解(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;
      }
      
      • 0
        @ 2024-12-29 11:23:03

        好心的出题人让数据出现了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;
        

        }

        • 0
          @ 2024-12-29 11:20:50

          题面有误++

          正解:

          #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;
          }
          
          • 1

          信息

          ID
          47
          时间
          1000ms
          内存
          128MiB
          难度
          7
          标签
          (无)
          递交数
          32
          已通过
          10
          上传者