比赛 ICPC复现(AI数据) 评测结果 AAAAAAAAAA
题目名称 赚的越多,赚的越少 最终得分 100
用户昵称 RpUtl 运行时间 0.030 s
代码语言 C++ 内存使用 3.82 MiB
提交时间 2026-05-26 19:31:10
显示代码纯文本
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,x,k,s,lst;
int main(){
	freopen("zhuan.in","r",stdin);
	freopen("zhuan.out","w",stdout);
	scanf("%lld %lld %lld",&n,&x,&k);
	for(int i=1;i<=n;i++){
		lst=s;
		s+=x;s-=s/k;
		if(lst==s){
			printf("%lld\n",s);
			return 0;
		}
	}
	printf("%lld\n",s);
	return 0;
}