3 条题解

  • 2
    @ 2023-10-1 15:22:28
    #include<iostream>
    #include<cstdio>
    #include<cmath>
    using namespace std;
    int main(){
    	int h,r,b;
    	double v,a;
    	scanf("%d %d",&h,&r);
    	v = 3.14*r*r*h;
    	a = 20000/v;
    	b = ceil(a);
    	printf("%d",b);
    	return 0;
    }
    
    • 1
      @ 2023-10-22 11:06:02
      #include <bits/stdc++.h>
      using namespace std;
      int main()
      {
          int h,r;
          cin>>h>>r;
          int end = 20000/(3.14*r*r*h)+1;
          cout<<end;
          return 0;
      }
      
      • -3
        @ 2022-8-30 12:03:27
        //(water problem)
        #include<bits/stdc++.h>
        //#pragma GCC optimize (3)
        using namespace std;
        inline int read(){	//无聊的快读
            int s=0,w=1;
            char c=getchar();
            while(!isdigit(c)) w=-1,c=getchar();
            while(isdigit(c)) s=s*10+(c^48),c=getchar();
            return s*w;
        }
        inline void write(int x){	//无聊的快写
        	if(x<0) putchar('-'),x=-x;
            if(x>9) write(x/10);
            putchar(x%10+'0');
        }
        int main()
        {
        	int h=read(),r=read();
        	double S=3.14159265*r*r*h/1000;
        	write(int(ceil(20/S)));
            return 0;
        }
        
      • 1

      信息

      ID
      6841
      时间
      1000ms
      内存
      128MiB
      难度
      1
      标签
      (无)
      递交数
      99
      已通过
      39
      上传者