Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
76468 Kevin 14能吸多少根烟 C++ Wrong Answer 0 MS 272 KB 169 2024-06-02 14:45:28

Tests(0/10):


Code:

#include<iostream> #include<cmath> using namespace std; int main(){ int n,k,s=0; cin>>n>>k; s=n; while(n>0){ n=n/k; s+=n; } cout<<s; return 0; }


Run Info:

------Input------
159 16
------Answer-----
169
------Your output-----
168