Submission #891008

# Submission time Handle Problem Language Result Execution time Memory
891008 2023-12-22T06:10:02 Z vjudge1 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
    while(b!=0){
        int temp=b;
        b=a%b;
        a=temp;
    }
    return a;
}

int lcm(int a, int b){
    return(a*b)/gcd(a, b);
}

int rec(int aa, int bb){
    int res=aa;
    for(int i=aa+1; i<=bb; i++){
        res=lcm(res, i);
    }
    return res;
}
int cnt(int n){
    int c=0;
    while(n%10==0){
        c++;
        n/=10;
    }
    return c;
}
int main(){
    int a, b;
    cin>>a>>b;
    int ans=rec(a, b);
	cout<<cnt(ans);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -