竞赛
考级
T4 题意分析 本题只要用 ceilceilceil 向上取整函数模拟出这个式子即可。可以采用函数的思想,把相同的一些步骤封装起来,具体见代码。 代码
桌子乱的反义词
zsy
#include <bits/stdc++.h> using namespace std; int main(){ double x,y,z; int n=0; cin>>x>>y>>z; n=ceil((ceil((x+y+z)/3)+ceil((3x+5y+7z)/4)+ceil((11x+13y+17z)/5))/7); cout<<n; }
不用治,没毛病
#include <bits/stdc++.h> using namespace std; double get(double a, double b, double c, double d){ return ceil((a + b + c) / d); } int main(){ double x, y, z; cin >> x >> y >> z; cout << get(get(x, y, z, 3), get(3 * x, 5 * y, 7 * z, 4), get(11 * x, 13 * y, 17 * z, 5), 7); }
∴༺ཌༀ哈基米ༀད༻∵
LS_YZY
Hello world
链接描述
茉莉与你
#include <iostream> #include<cmath> using namespace std; int main() { double a,b,c; cin >> a>>b>>c; }
Nosothring
提交答案之后,这里将显示提交结果~