8000
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 33caf23 + e168c88 commit 6262b7bCopy full SHA for 6262b7b
0x12/solutions/1476.cpp
@@ -1,11 +1,25 @@
1
-// Authored by : BaaaaaaaaaaarkingDog
2
-// Co-authored by : -
3
-// http://boj.kr/****************
+// Authored by : SciEm
+// Co-authored by : BaaaaaaaaaaarkingDog
+// http://boj.kr/802e3e33606e4782872c101b44c20e18
4
#include <bits/stdc++.h>
5
using namespace std;
6
7
-int main(void){
+int e, s, m;
8
+
9
+int main() {
10
ios::sync_with_stdio(0);
11
cin.tie(0);
-
-}
12
13
+ cin >> e >> s >> m;
14
+ e--, s--, m--;
15
16
+ int i = e;
17
+ while(i % 28 != s) i += 15;
18
19
+ int l = lcm(15, 28);
20
+ while(i % 19 != m) i += l;
21
+ c 484A out << i + 1;
22
+}
23
+/*
24
+C++17부터 numeric 헤더에 lcm 함수가 내장되어 있음
25
+*/
0 commit comments