# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
5731 | model_code | 관대한 주인 (TOKI14_generous) | C++98 | 100 ms | 1088 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
* Official Solution
*
* Generous Butcher
* William Gozali
*/
#include <cstdio>
#define LL long long
using namespace std;
LL A, B, K1, K2;
LL pouw(LL a, LL b, LL c){
if (b == 0) return 1;
if (b & 1) return (a * pouw(a,b-1,c)) % c;
LL t = pouw(a, b/2, c);
return (t * t) % c;
}
int main()
{
scanf("%lld %lld %lld %lld", &A, &B, &K1, &K2);
A %= B;
for (LL i = K1; i <= K2; i++){
LL x = (A * pouw(10, i-1, B)) % B;
printf("%lld", (x*10)/B);
# | 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... |