提交时间:2020-10-31 20:16:58
运行 ID: 8454
#include<bits/stdc++.h> using namespace std; int a1[3][100100]={0}; int main(){ int a,b,n; cin>>a>>b>>n; a=a%b; a1[1][0]=a*10/b; a1[2][0]=a*10%b; for(int i=1;i<=n;i++){ a1[1][i]=a1[2][i-1]*10/b; a1[2][i]=a1[2][i-1]*10%b; } cout<<a1[1][n-1]; return 0; }