이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
ll n, m, d;
cin >> n >> m >> d;
if (d == 1 && n % m == 0)
cout << n / m;
else if (d == 3 && n % (3 * m) == 0)
cout << n / (3 * m) * (3 * m + 6 * (m - 1) + 7);
else if (d == 7 && n % (6 * m) == 0) {
// Period: 015873
n /= 6;
} else if (d == 9 && n % (9 * m) == 0)
cout << n / (9 * m) * (36 * m + 1);
else cout << "NESIDALO";
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... |