标签:def http ble n+2 数字 ret long cpp define
#include <iostream> #include<cstdio> using namespace std; #define ll long long int main() { ll a,b,n; cin>>a>>b>>n; a%=b; while(n-10>0){ //这里其实是下边的一个加速 a=a*1e10; a%=b; n-=10; } for(int i=0;i<n+2;i++){ //模拟除法,不断乘10,然后取余 a*=10; if(i>=n-1)printf("%d",a/b); a%=b; } return 0; }
标签:def http ble n+2 数字 ret long cpp define
原文地址:https://www.cnblogs.com/52dxer/p/10539709.html