This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
ll n, m, d;
cin >> n >> m >> d;
ll ans = 0;
if (d == 1 && n % m == 0) {
ans = n / m;
cout << ans << "\n";
} else if (d == 3 && n % (3 * m) == 0) {
ans = n * 3 + (n / (3 * m));
cout << ans << "\n";
} else if (d == 9 && n % (9 * m) == 0) {
ans = n * 4 + (n / (9 * m));
cout << ans << "\n";
} else {
cout << "NESIDALO\n";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |