Submission #7075553


Source Code Expand

#include<iostream>
using namespace std;
#include <numeric>

int main(){
  int a, b, n;
  cin >> a >> b >> n;
  int l = (a*b)/gcd(a, b);
  int r = l;
  while (ans<n){
      r += l;
  }
  int ans = r + l;
  cout << l << endl;
}
  

Submission Info

Submission Time
Task A - 高橋君と青木君の好きな数
User faishikusu
Language C++14 (GCC 5.4.1)
Score 0
Code Size 243 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:8:25: error: ‘gcd’ was not declared in this scope
   int l = (a*b)/gcd(a, b);
                         ^
./Main.cpp:10:10: error: ‘ans’ was not declared in this scope
   while (ans<n){
          ^