之前做的比赛,一直没整理。当时做出来两道题,水水的~比cf的div2要简单
当时比赛只写出了A,B两题
https://abc111.contest.atcoder.jp/assignments
A - AtCoder Beginner Contest 999
#include<iostream> #include<cstdio> #include<cstring> using namespace std; typedef long long ll; int main(){ char str[5]; cin>>str; for(int i=0;i<3;i++){ if(str[i]=='1') cout<<'9'; else cout<<'1'; } return 0; }
B - AtCoder Beginner Contest 111
#include<iostream> #include<cstdio> #include<cstring> using namespace std; typedef long long ll; int main(){ int n; cin>>n; int a=n/100; if(a*111>=n) cout<<a*111<<endl; else cout<<(a+1)*111<<endl; return 0; }