hack
查看原帖
hack
542773
leogao120129楼主2024/4/21 15:46
#pragma GCC optimize(2)

#include<bits/stdc++.h>
using namespace std;
int main(){
    long long a, b, n;
    scanf("%lld %lld %lld", &a, &b, &n);
    long long sum = 0;
    int i = 0;
    int u = 0;
    while(n>sum){
        if(i<=4){
            sum+=a;
        }else{
            sum+=b;
        }
        i=(i+1)%7;
        u++;
    }
    printf("%d", u);
    return 0;
}
input:34 94 651312398093197534

output:12735158621934031

此代码可被上方数据hack

2024/4/21 15:46
加载中...