葉林
Linked with GitHub
# ZeroJudge - c079: 10346 - Peter's Smokes ### 題目連結:https://zerojudge.tw/ShowProblem?problemid=c079 ###### tags: `ZeroJudge` `數學` ```cpp= #include <iostream> using namespace std; int main() { cin.sync_with_stdio(false); cin.tie(nullptr); int cigarettes, demand; while (cin >> cigarettes >> demand) cout << cigarettes + (cigarettes - 1) / (demand - 1) << '\n'; } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up