QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#739564 | #5115. Clone Ranran | YangHyyy | WA | 0ms | 3640kb | C++23 | 411b | 2024-11-12 22:12:10 | 2024-11-12 22:12:11 |
Judging History
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'