2 solutions

  • 5
    @ 2023-9-16 21:58:57
    #include <bits/stdc++.h>
    using namespace std;
    const double pi=3.14159;
    double h,r;
    int main(){
    	cin>>h>>r;
    	long double v=h*r*r*pi;
    	for(int i=1;i<=100;i++){
    		if(v*i>=20){
    			cout<<i<<endl;
    			break;
    		}
    	}
    	return 0;
    }
    
    • 1
      @ 2023-9-17 11:33:04
      #include <bits/stdc++.h>
      using namespace std;
      int main(int argc, char **argv){
      int h,r,l,t;
      cin >> h >> r;
      l = ((3.14 * r * r) * h) / 1000;
      t = 20 / l + 1;
      printf("%d",t);
      return 0;
      }
      
      • 1

      Information

      ID
      518
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      4
      Tags
      # Submissions
      272
      Accepted
      131
      Uploaded By