CB001


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 512M

Problem type

Cho hai số nguyên dương \(n,m (1≤n,m≤10^9)\). Tính và đưa ra màn hình \(UCLN(n,m).\)

Input:

  • Gồm một dòng chứa hai số \(n,m (1≤n,m≤10^9)\)

Output:

  • In ra \(UCLN(n,m)\)

Sample Input

6 8

Sample Output

2

Comments


  • 0
    Truongduyhung_lop9  commented on Oct. 3, 2024, 7:40 a.m.

    include <bits/stdc++.h>

    using namespace std; long long a; int main(){ cin >> a ; a = a+1; cout << a; return 0; }


  • -1
    10Tin_nguyenkhanhduong  commented on July 9, 2024, 10:26 p.m.

    include <bits/stdc++.h>

    using namespace std; long long n,m,U; int main() { cin>>n>>m; U=__gcd(n,m); cout<<U; return 0; }