結果

問題 No.304 鍵(1)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-03-01 10:36:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 400 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 2,665 ms
コンパイル使用メモリ 72,552 KB
実行使用メモリ 75,008 KB
平均クエリ数 309.17
最終ジャッジ日時 2023-09-24 02:07:15
合計ジャッジ時間 4,515 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
72,332 KB
testcase_01 AC 198 ms
71,988 KB
testcase_02 AC 400 ms
75,008 KB
testcase_03 AC 187 ms
72,148 KB
testcase_04 AC 313 ms
73,068 KB
testcase_05 AC 186 ms
71,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
        for (int i = 0; i < 1000; i++) {
            String password = String.format("%03d", i);
            System.out.println(password);
            System.out.flush();
            
            String answer = stdin.nextLine();
            if (answer.equals("unlocked")) {
                System.exit(0);
            }
        }
    }
}
0