| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 74845 | 单明哲 | 14能吸多少根烟 | C++ | Compile Error | 0 MS | 0 KB | 283 | 2024-05-26 09:41:27 |
#include <iostream> #include <iomanip> using namespace std; int main(){ int cir,sum=0,ba,newcir = 0; cin>>cir>>k; sum += cir; ba = cir; while(ba >= k){ newcir = ba/k; b =ba%k; ba = newcir + b; sum += newcir; } cout<<sum; }
Main.cc: In function 'int main()':
Main.cc:6:15: error: 'k' was not declared in this scope
cin>>cir>>k;
^
Main.cc:11:7: error: 'b' was not declared in this scope
b =ba%k;
^