QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#739564#5115. Clone RanranYangHyyyWA 0ms3640kbC++23411b2024-11-12 22:12:102024-11-12 22:12:11

Judging History

你现在查看的是最新测评结果

  • [2024-11-12 22:12:11]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3640kb
  • [2024-11-12 22:12:10]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
	int a,b,c;
	cin>>a>>b>>c;
	int x=1,ans=c*b,cnt=0,num=0;
	while(x<=100*c)
	{
		cnt=c/x*b+num;
		if(c%x!=0)cnt+=b;
		//if(c%b!=0)cnt+=b;
		ans=min(ans,cnt);
		x*=2;
		num+=a;
		//cnt=c/x*b;
		//ans=min(ans,cnt+num);
	}
	cout<<ans;
}
signed main()
{
	int t;
	cin>>t;
	while(t--)
	solve();
	return 0;
 } 

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3640kb

input:

5
1 1 1
2 3 3
9 9 9
3 26 47
1064 822 1048576

output:

17454421860

result:

wrong answer 1st numbers differ - expected: '1', found: '17454421860'