版本比较
题解:P15893 [TOPC 2025] Take It or Double It
正文
增加 2 行删除 2 行
123345678891011128 行未改动## [题目传送门](https://www.luogu.com.cn/problem/P15893)## 思路当前为 $x$ 美元,那么选择 `double it` 后的钱chao'guo'le 会变为 $2x$。 当前为 $x$ 美元,那么选择 `double it` 后的钱chao'guo'le 会变为 $2x$。- 如果选择 `double it` 后的钱超过了 $d$,即 $2x > d$,输出 `take it`。- 反之,输出 `double it`。## AC CODE```cpp#include <bits/stdc++.h> #include <bits/stdc++.h>using namespace std;int main() { int x, d; cin >> x >> d;8 行未改动