Skip to content

Commit

Permalink
Solved Diagonal Cut
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfeifer1 committed Nov 17, 2019
1 parent 9939849 commit 43a7a85
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions diagonalcut.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

int main() {
ll a, b;
cin >> a >> b;
ll g = __gcd(a,b);
a /= g;
b /= g;
if(a % 2 == 0 || b % 2 == 0) g = 0;
cout << g << endl;
}

0 comments on commit 43a7a85

Please sign in to comment.