We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5a08c3d + 0105ac1 commit 991d109Copy full SHA for 991d109
[Week17 - NumberTheory&Prime]/이현동/1850
48.9 KB
[Week17 - NumberTheory&Prime]/이현동/1850.cpp
@@ -0,0 +1,24 @@
1
+#include <bits/stdc++.h>
2
+using namespace std;
3
+typedef long long ll;
4
+
5
+ll A, B;
6
7
+ll gcd(ll x, ll y)
8
+{
9
+ return y ? gcd(y, x % y) : x;
10
+}
11
+int main()
12
13
+ ios::sync_with_stdio(0);
14
+ cin.tie(0);
15
16
+ cin >> A >> B;
17
+ ll ans;
18
+ ans = gcd(A, B);
19
20
+ for (int i = 0; i < ans;i++)
21
+ cout << 1;
22
23
+ return 0;
24
0 commit comments