4 条题解

  • 3
    @ 2023-1-26 17:14:35
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,n;
    	cin>>a>>b>>n;
    	for(int i=1;i<=a;i++)
    	{
    		a=a%b;
    		a=a*10;
    		a/=b;
    	}
    	cout<<a;
    }
    

    这题只需要重复执行除法运算的过程就好了,不算太难这题只需要重复执行除法运算的过程就好了,不算太难

    BUG:
    →→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→?
    提示按下鼠标滚轮,鼠标向右移有惊喜!!!
    • 1
      @ 2022-1-9 19:43:36
      #include<stdio.h> 
      using namespace std;
      int t,a,b,n;
      int main()
      {
          scanf("%d%d%d",&a,&b,&n);
          for (int i = 1; i<=n; i++)
          {
              a*=10;
              t=a/b;
              a%=b;
          }
          printf("%d",t );
      }
      
      • -2
        @ 2022-7-9 10:09:00

        //***************************

        //dev c++[[990.cpp]]*******

        //dev c++[top fanil]]******

        //dev c++*www.temege.com

        #include <stdio.h>

        #include <iostream>

        #include <math.h>

        #include <queue>

        #include <stack>

        #include <vector>

        #include <iomanip>

        using namespace std;

        int main()

        {

        int a,b,n;
        
        
        
        
        
        cin>>a>>b>>n;
        
        
        
        
        
        a=a*10;
        
        
        
        
        
        int ans;
        
        
        
        
        
        while(n--)\
        
        
        
        
        
        
        {
        
        
        
        
        
        	ans=a/b;
        
        
        
        
        
        	a%=b;
        
        
        
        
        
        	a*=10;
        
        
        
        
        
        }
        
        
        
        
        
        cout<<ans<<endl;
        
        
        
        
        
        return 0;
        

        }

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        ////////////////////////////

        • -3
          @ 2022-1-11 11:45:02
          #include <stdio.h>
          #include <iostream>
          #include <math.h>
          using namespace std;
          int main()
          {
          	long long a,b,n;
          	cin>>a>>b>>n;
          	while(n--)
          	{
          		a=a%b;
          		a*=10;
          	}
          	cout<<a/b<<endl;
          }
          
          • 1

          信息

          ID
          935
          时间
          1000ms
          内存
          128MiB
          难度
          4
          标签
          递交数
          424
          已通过
          199
          上传者