10000
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.
1 parent 816221b commit ecf2fc8Copy full SHA for ecf2fc8
0x12/solutions/1193.cpp
@@ -1,11 +1,20 @@
1
-// Authored by : BaaaaaaaaaaarkingDog
+// Authored by : SciEm
2
// Co-authored by : -
3
-// http://boj.kr/****************
+// http://boj.kr/037f3a0f8454498d8b609d819fd67398
4
#include <bits/stdc++.h>
5
using namespace std;
6
7
-int main(void){
+int main() {
8
ios::sync_with_stdio(0);
9
cin.tie(0);
10
-
11
-}
+
+ int x; cin >> x;
12
13
+ int i = 1;
14
+ while (x > i) x -= i++;
15
16
+ int nume = x;
17
+ int deno = i + 1 - x;
18
+ if (i % 2) swap(nume, deno);
19
+ cout << nume << '/' << deno;
20
+}
0 commit comments