Submission #17481021


Source Code Expand

Copy
#include <iostream>
#include <cmath>
#include <climits>
#include <vector>
#include <algorithm>
using namespace std;
 
int main()
{
    //cin.tie(0);
    //ios_base::sync_with_stdio(false);
 
    long long x, y, a, b, cnt=0;
    cin>>x>>y>>a>>b;
 
    while(x*a<x+b && x*a<y){
        x*=a;
        cnt++;
    }
    cout<<(y-x-1)/b+cnt;
    return 0;
}
 

Submission Info

Submission Time
Task D - Takahashi Unevolved
User n_Flamel
Language C++ (GCC 9.2.1)
Score 0
Code Size 375 Byte
Status WA
Exec Time 2205 ms
Memory 3632 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 2
AC × 24
WA × 6
TLE × 1
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, max_01.txt, max_02.txt, max_03.txt, max_04.txt, max_05.txt, max_06.txt, max_07.txt, max_08.txt, max_09.txt, max_10.txt, max_11.txt, max_12.txt, max_13.txt, max_14.txt, max_15.txt, max_16.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt TLE 2205 ms 3304 KB
max_01.txt WA 8 ms 3392 KB
max_02.txt WA 3 ms 3376 KB
max_03.txt AC 3 ms 3632 KB
max_04.txt AC 2 ms 3608 KB
max_05.txt WA 2 ms 3604 KB
max_06.txt WA 2 ms 3432 KB
max_07.txt AC 2 ms 3436 KB
max_08.txt AC 2 ms 3544 KB
max_09.txt AC 6 ms 3544 KB
max_10.txt AC 2 ms 3544 KB
max_11.txt AC 2 ms 3548 KB
max_12.txt AC 3 ms 3432 KB
max_13.txt AC 2 ms 3604 KB
max_14.txt AC 2 ms 3544 KB
max_15.txt AC 2 ms 3556 KB
max_16.txt AC 2 ms 3612 KB
random_01.txt AC 3 ms 3564 KB
random_02.txt AC 3 ms 3540 KB
random_03.txt AC 4 ms 3372 KB
random_04.txt AC 3 ms 3564 KB
random_05.txt AC 2 ms 3500 KB
random_06.txt AC 2 ms 3436 KB
random_07.txt WA 2 ms 3560 KB
random_08.txt AC 2 ms 3500 KB
random_09.txt WA 2 ms 3396 KB
random_10.txt AC 2 ms 3424 KB
random_11.txt AC 2 ms 3508 KB
random_12.txt AC 2 ms 3564 KB
sample_01.txt AC 3 ms 3556 KB
sample_02.txt AC 3 ms 3540 KB