#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 0x3f3f3f3f
const int N=2e5+5;
int h,a,b;
void solve(){
cin>>h>>a>>b;
a*=5,b*=15;
if(a>=b){
if(h%a==0) cout<<h/a;
else cout<<h/a+1;
}
else{
if(h%b==0) cout<<h/b;
else cout<<h/b+1;
}
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
int t=1;
// cin>>t;
while(t--) solve();
return 0;
}
魔法寄录(思维)---牛客练习赛98-A
最新推荐文章于 2024-09-14 22:25:23 发布
该C++代码实现了一个程序,解决了一个关于台阶问题:给定高度h和两个步长a和b,计算最小步数。程序使用了条件语句和循环结构,根据a和b的大小关系进行分情况处理。
摘要由CSDN通过智能技术生成