Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6387 刘芃伽 11种树 C++ Compile Error 0 MS 0 KB 428 2025-02-22 09:16:09

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 ; double a; cin>>n>>k; a=n/k+1; if(n%k>1){ a+1 cout<<a<<endl; } else{ cout<<a<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:13: error: 'k' was not declared in this scope
     cin>>n>>k;
             ^
Main.cc:14:9: error: expected ';' before 'cout'
         cout<a<<endl;
         ^
Main.cc:13:10: warning: statement has no effect [-Wunused-value]
         a+1
          ^