Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147961 徐启航 判断三角形形状 C++ Compile Error 0 MS 0 KB 326 2026-02-09 09:32:15

Tests(0/0):


Code:

#include<iostream> #include<cstdio> int main(){ int a,b,c,t; cin>>t; for(int i=1;i<=t;i++){ cin>>a>>b>>c; if(a==b||b==c||a==c)cout<<"perfect"<<endl; else if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a) cout<<"good"<<endl; else cout<<"just a triangle"<<endl; }return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cin' was not declared in this scope
     cin>>t;
     ^
Main.cc:5:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:8:29: error: 'cout' was not declared in this scope
         if(a==b||b==c||a==c)cout<<"perfect"<& __os)
     ^
Main.cc:9:59: error: 'cout' was not declared in this scope
         else if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a) cout<<"good"<& __os)
     ^
Main.cc:10:14: error: 'cout' was not declared in this scope
         else cout<<"just a triangle"<& __os)
     ^