90232024-02-12 11:12:14PedriA sárkány feladványa (50)cpp17Wrong answer 22/503ms3496 KiB
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
   ifstream f("be.in");
    for(int d=1;d<=3;d++){
      int x, y, t;
      cin>>x>>y>>t;
      long long a=x, b=y, lkkt;
      long long m=a%b;
      while(m!=0){
         a=b;
         b=m;
         m=a%b;
      }
      lkkt=x*y/b;
      long long r=lkkt;
      int j=0;
      while(r!=0){
         j++;
         r=r/10;
      }
      if(j<=t){
         cout<<lkkt;
         for(int i=j+1;i<=t;i++)cout<<0;
      cout<<endl;
      }else cout<<"-1"<<endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base22/50
1Accepted0/03ms1808 KiB
2Wrong answer0/03ms2060 KiB
3Accepted3/32ms2140 KiB
4Accepted3/33ms2272 KiB
5Accepted3/32ms2328 KiB
6Accepted3/33ms2524 KiB
7Accepted3/32ms2612 KiB
8Wrong answer0/32ms2612 KiB
9Wrong answer0/33ms2740 KiB
10Wrong answer0/33ms2952 KiB
11Wrong answer0/32ms3032 KiB
12Accepted3/33ms3160 KiB
13Wrong answer0/43ms3248 KiB
14Accepted4/43ms3364 KiB
15Wrong answer0/43ms3368 KiB
16Wrong answer0/43ms3496 KiB
17Wrong answer0/43ms3456 KiB