QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#275875#5259. Skills in PillswangqingxianWA 0ms3704kbC++141.2kb2023-12-05 10:37:302023-12-05 10:37:30

Judging History

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

  • [2023-12-05 10:37:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3704kb
  • [2023-12-05 10:37:30]
  • 提交

answer

#include<algorithm>
#include<vector>
#include<cstdio>
#include<map>
#include<cstring>
#include<iostream>
#include<cstdlib>
#include<iomanip>
#include<bitset>
#include<queue>
#include<cassert>
#include<stdlib.h>
#include<cmath>
#include<set>
//#define ll long long
#define ld long double
#define For(i,l,r) for(int i=(l);i<=(r);i++)
#define rof(i,r,l) for(int i=(r);i>=(l);i--)
#define db double
#define mem0(a) memset(a,0,sizeof(a))
#define ull unsigned long long
#define lowbit(t) (t&-t)
#define uint unsigned int
#define int long long
#define x1 alkjhfasdlkjfawlkf
#define x2 fsdouifiaojlfkwewj
#define y1 sdlkajfaskljfiowfw
#define y2 ajlfioueuoijwefoja
using namespace std;
const int N=1e6+10,inf=0x7fffffff,mod=998244353;
int k1,k2,n;
int ans=0;
bool f=1;
int bk=0;
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    cin>>k1>>k2>>n;
    ans=n/k2;
    for(int i=k1;i<=n;i+=k1){
        if((i%k2-bk+k2)%k2==0){
            if(f){
                i--;
                f=0;
            }
            else{
                bk++;
                f=1;
            }
        }
        ans++;
    }
    cout<<ans<<endl;
    return 0;
}
/*
 */

詳細信息

Test #1:

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

input:

3 9 20

output:

9

result:

wrong answer 1st lines differ - expected: '8', found: '9'