Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133729 王奕杰 11种树 C++ Compile Error 0 MS 0 KB 360 2025-10-20 19:11:56

Tests(0/0):


Code:

include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,k; cin>>n>>k; int(n%k>1){ cout<<n/k+1+1;} else cout<<n/k+1; return 0; }


Run Info:

Main.cc:1:1: error: 'include' does not name a type
 include  // cin\cout\endl
 ^
In file included from /usr/include/c++/5/cmath:43:0,
                 from Main.cc:5:
/usr/include/c++/5/ext/type_traits.h:160:35: error: '__gnu_cxx::__is_null_pointer' declared as an 'inline' variable
   __is_null_pointer(std::nullptr_t)
                                   ^
/usr/include/c++/5/ext/type_traits.h:160:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of symbol
/usr/include/c++/5/ext/type_traits.h:155:5: note: previous declaration 'template bool __gnu_cxx::__is_null_pointer(_Type)'
     __is_null_pointer(_Type)
     ^
/usr/include/c++/5/ext/type_traits.h:160:21: error: 'nullptr_t' is not a member of 'std'
   __is_null_pointer(std::nullptr_t)
                     ^
Main.cc: In function 'int main()':
Main.cc:9:5: error: 'cin' was not declared in this scope
     cin>>n>>k;
     ^
Main.cc:10:15: error: expected ';' before '{' token
     int(n%k>1){
               ^
Main.cc:10:12: warning: statement has no effect [-Wunused-value]
     int(n%k>1){
            ^
Main.cc:13:1: error: 'else' without a previous 'if'
 else
 ^
Main.cc:14:1: error: 'cout' was not declared in this scope
 cout<