結果

問題 No.305 鍵(2)
ユーザー Mcpu3Mcpu3
提出日時 2018-09-17 23:47:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 235 ms / 2,000 ms
コード長 751 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 71,924 KB
実行使用メモリ 72,668 KB
平均クエリ数 86.69
最終ジャッジ日時 2023-09-24 01:54:16
合計ジャッジ時間 5,815 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 225 ms
72,036 KB
testcase_01 AC 209 ms
71,788 KB
testcase_02 AC 226 ms
71,936 KB
testcase_03 AC 215 ms
71,964 KB
testcase_04 AC 219 ms
71,868 KB
testcase_05 AC 221 ms
70,640 KB
testcase_06 AC 139 ms
71,820 KB
testcase_07 AC 230 ms
71,992 KB
testcase_08 AC 235 ms
72,668 KB
testcase_09 AC 229 ms
72,320 KB
testcase_10 AC 220 ms
72,148 KB
testcase_11 AC 224 ms
72,072 KB
testcase_12 AC 215 ms
71,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int a[]=new int[10],m,t1,t2=0,j;
        String s=new String();
        for(int i=0;i<10;++i){
            m=0;
            for(j=0;j<10;++j){
                a[i]=j;
                for(int k=0;k<10;++k)System.out.print(a[k]);
                System.out.println();
                System.out.flush();
                t1=sc.nextInt();
                s=sc.next();
                if(t1>9)break;
                if(t1>m){
                    m=t1;
                    t2=j;
                }
            }
            if(10>j)break;
            a[i]=t2;
        }
        sc.close();
    }
}
0