#include using namespace std; int main() { // 1. 入力情報取得. string judge; // 2. 解錠をチェックし, 出力. int i = 0; while(1){ cin >> judge; if(judge == "unlocked") return 0; cout << setfill('0') << setw(3) << i << "\n" << flush; i++; if(i > 999) return 0; } // 3. 後処理. return 0; }