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 e5f96e5 commit 93bac56Copy full SHA for 93bac56
codeforces/Codeforces Round #397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined)/C.cpp
@@ -0,0 +1,21 @@
1
+// http://codeforces.com/contest/765/problem/C
2
+
3
+#include<bits/stdc++.h>
4
+using namespace std;
5
6
+#define endl '\n'
7
+#define D(x) cout << #x << " = " << (x) << endl;
8
9
+int main() {
10
+ int k, a, b;
11
+ cin >> k >> a >> b;
12
13
+ int aa = a / k;
14
+ int bb = b / k;
15
16
+ int ans = (a / k) + (b / k);
17
+ if (a % k != 0 && !bb || b % k != 0 && !aa) cout << -1 << endl;
18
+ else cout << ans << endl;
19
20
+ return 0;
21
+}
codeforces/data.db
@@ -934,4 +934,5 @@
934
24577407
935
24578991
936
24681844
937
-24682004
+24682004
938
+24699903
0 commit comments