题目链接:http://lx.lanqiao.cn/problemset.page?code=PREV-&userid=162162
#include<bits/stdc++.h>
using namespace std;
#define debug puts("YES");
#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)
#define ll long long
#define lrt int l,int r,int rt
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define root l,r,rt
#define mst(a,b) memset((a),(b),sizeof(a))
#define pii pair<int,int>
#define fi first
#define se second
#define mk(x,y) make_pair(x,y)
const int mod=1e9+7;
const int maxn=5e2+5;
const int ub=1e6;
ll powmod(ll x,ll y){ll t; for(t=1;y;y>>=1,x=x*x%mod) if(y&1) t=t*x%mod; return t;}
ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
ll n,m,k;
int tot=0,stp=0;
map<int,int> mp;
int main(){
cin>>n>>m>>k;
if(n>m) n%=m;
while(k-1>0){
stp++;
n=10*n%m;
if(mp[n]) k%=(stp-mp[n]);
else mp[n]=++tot;
k--;
}
cout<<n*10/m;n=n*10%m;
cout<<n*10/m;n=n*10%m;
cout<<n*10/m;n=n*10%m;
return 0;
}