这道题怎么可能没有题解 蒟蒻捡漏中
题目: P15893 [TOPC 2025] Take It or Double It
思路
题目说
台湾人都非常善良,因此当他们有选择时,他们总是会说“double it”
所以只有你强制他
take it
的时候他才会手下这笔钱。
其实就是判断游戏金额double之后是否超过手里的钱数()
AC CODE
直接上代码
#include <iostream>
using namespace std;
int main() {
int x, d;
cin >> x >> d;
if (x * 2 <= d) cout << "double it" << endl;
else cout << "take it" << endl;
return 0;
}发现没什么注释可以加了 就这样吧