ABC111B - AtCoder Beginner Contest 111
問題:B - AtCoder Beginner Contest 111
#include <iostream> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) int main(void) { int n; cin.tie(0); ios::sync_with_stdio(false); cin >> n; FOR(i, n , 1000) { if (i == (i / 100) * 111) { cout << i << "\n"; break; } } return 0; }