#include <iostream>
using namespace std;
class Stairs {
public:
int stair;
int up;
int fin;
void stepNeeded() {
if (stair > 0) {
if (up > 0) {
fin = (stair + up - 1) / up;
cout << fin <<endl;
}else{
cout << "불가능" <<endl;
}
}else{
cout << "잘못된 입력" <<endl;
}
}
};
int main() {
Stairs s;
cin >> s.stair;
cin >> s.up;
s.stepNeeded();
}
To embed this project on your website, copy the following code and paste it into your website's HTML: