AT_abc251_d ABC251D At Most 3 (Contestant ver.)
原题链接:D. At Most 3 (Contestant ver.)
分析
发现要凑齐 10 6 10^6 106,共 6 6 6 位, 3 3 3 个数的和,所以,每一个管两位,直接乘一下没了。
场上少输了一个 1000000 1000000 1000000,我的 100pts😭
正解
cpp
#include <bits/stdc++.h>
using namespace std;
int n;
signed main(){
// freopen("construct.in", "r", stdin);
// freopen("construct.out", "w", stdout);
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n;
cout << 298 << '\n';
for (int i = 1; i <= 99; i++){
cout << i << " " << i * 100 << " " << i * 10000 << " ";
}
cout << 1000000;
}
CF2255B A Ribbon for Tomorrow
分析
这个是原,之前做过。
LGP17198 KOI 2026 #2 杂技
原题链接:KOI 2026 #2 杂技