Skip to content

Commit

Permalink
Add 30878.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye committed Mar 18, 2024
1 parent 2eace3e commit 9c2c365
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 30xxx/30878.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
using namespace std;

int gcd(int a, int b) {
return b ? gcd(b, a % b) : a;
}

void solve(void) {
int m; cin >> m;

int a = m * m * (90 - m);
int b = 108000;
int g = gcd(a, b);
cout << a / g << "/" << b / g;
}

int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);

solve();
return 0;
}

0 comments on commit 9c2c365

Please sign in to comment.