2 条题解
- 1
信息
- ID
- 126
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 8
- 标签
- 递交数
- 39
- 已通过
- 6
- 上传者
#include<stdio.h>
int main()
{
long long n, k, temp = 1, count = 0;
scanf("%lld%lld", &n, &k);
n--;
while (n>0)
{
n -= temp * k;
temp += temp * k;
count++;
}
printf("%lld", count);
return 0;
}