# ZeroJudge - f754: DD好想哭 ### 題目連結:https://zerojudge.tw/ShowProblem?problemid=f754 ###### tags: `ZeroJudge` `模擬` ```cpp= #include <iostream> using namespace std; int main() { cin.sync_with_stdio(false); cin.tie(nullptr); long long money, people, quotient, remainder; int times; cin >> times; for (int t = 1; t <= times; ++t) { cin >> money >> people; quotient = money / people; remainder = money % people; cout << "Case " << t << " :\n"; for (int i = 1; i < people; ++i) cout << "第" << i << "位 : 拿" << quotient << "元並說DD! BAD!\n"; cout << "第" << people << "位 : 拿" << quotient + remainder << "元並說DD! BAD!\n"; } } ```