题解:P13678 [GCPC 2023] Mischievous Math

· · 题解

题目大意

题目传送门

题目分析

我们可以证明,当 a = 1,b = 2,c = 3 时,完全无法凑出 \ge 10 的数字。当 d \le 10 时,我们让 a = 57,b = 91,c = 11,一定无法凑出 \le 10 的数。

代码实现

#include <bits/stdc++.h>
using namespace std;
int d;
int main() {
    cin >> d;
    if (d >= 10)cout << "1 2 3";
    else cout << "57 91 11";
    return 0;
}