int a,b,c;cin >> a >> b >> c; for(int i=0;i<5;i++){ if (a <=b&&a<=c){ a++; }else if (b <= a && b <= c) { b++; } elseif(c <= a && c <= b) { c++; } } cout << a * b * c << endl;
voidsolve() { int n, m, k; cin >> n >> m >> k; // gi<=m fi>=k vector<int> a(n); int tag = 0; for (int i = n; i > 0; i--) { if (i > m) cout << i << ' '; else {
break; } } for (int i = 1; i <= m; i++) cout << i << ' ';
voidsolve() { int n, m, k; // m 跳跃强度 k是只能游泳k米 cin >> n >> m >> k; int lastlog = 0; int cocof = 0; string datas,datas2; datas.append("L"); cin >> datas2; datas.append(datas2);
datas.append("L"); for (int i = 0; i < datas.size(); i++) { char data = datas[i];
if (data == 'L') { int onelong = i - lastlog; if (onelong <= m) { lastlog = i; continue; } else { int sunhao = onelong - m;
voidsolve() { int n; cin >> n; vector<pair<int, int>> res; for (int a = 1; a <= 10000; a++) { string s = to_string(n); int len = int(s.size());//一位数,len=1,两位数,len=2
while (s.size() < 8) // n*a-B最多只能是7位数,这意味着对于每个a,B最多只能有7个值 { s += s; } for (int b = a * len - 1; b >= a * len - 8; b--)//还是那句话,结果 { if (1 <= b && b <= 10000) { int w = a * len - b; string t = s.substr(0, w);//结果字符串 if (stoi(t) == n * a - b) { res.emplace_back(a, b);//push_back,结果加一种。 } } } } cout << res.size() << '\n'; for (auto &[a, b] : res) { cout << a << " " << b << '\n'; } }