# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
236347 | dolphingarlic | Ones (LMIO17_vienetai) | C++14 | 5 ms | 384 KiB |
이 제출은 이전 버전의 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);
int n, m, d;
cin >> n >> m >> d;
if (d == 1 && n % m == 0) {
// Period: 1
cout << n / m;
} else if (d == 3 && n % (3 * m) == 0) {
// Period: 037
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) {
// Period: 012345679
cout << n / (9 * m) * (36 * m + 1);
} else return cout << "NESIDALO", 0;
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... |