ABC079A - Good Integer
#include <iostream> #include <string> using namespace std; int main(void) { string n; cin.tie(0); ios::sync_with_stdio(false); cin >> n; if ((n[0] == n[1] && n[1] == n[2]) || (n[1] == n[2] && n[2] == n[3])) { cout << "Yes" << "\n"; } else { cout << "No" << "\n"; } return 0; }
連続する3つの数字を考慮していなかった為、1WA。。