大佬帮忙看看
查看原帖
大佬帮忙看看
1043728
sujingyu1楼主2023/7/29 17:11

能不能用瓦能看懂的方法,谢谢谢谢谢谢\(OVO)/

#include <bits/stdc++.h>
using namespace std;
int main() {
	int h,r;
	cin>>h>>r;
	int a=3.14*r*r*h/1000;//一桶有多少升水 
	if(20/a==0){
		cout<<20/a;//没有余数 
	} else{
		cout<<20/a+1;//有余数多一桶 
	}
	
	return 0;
}
2023/7/29 17:11
加载中...