# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
940810 | rainboy | 관대한 주인 (TOKI14_generous) | C11 | 6 ms | 420 KiB |
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 <stdio.h>
long long power(long long a, int k, int md) {
long long p = 1;
a %= md;
while (k) {
if (k & 1)
p = p * a % md;
a = a * a % md;
k >>= 1;
}
return p;
}
int main() {
int a, b, l, r;
scanf("%d%d%d%d", &a, &b, &l, &r);
a = a % b * power(10, l - 1, b) % b;
while (l <= r)
printf("%lld", (long long) a * 10 / b), a = (long long) a * 10 % b, l++;
printf("\n");
return 0;
}
Compilation message (stderr)
# | 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... |