結果

問題 No.305 鍵(2)
ユーザー ルッツファンルッツファン
提出日時 2015-11-27 23:17:23
言語 Java21
(openjdk 21)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,329 bytes
コンパイル時間 3,208 ms
コンパイル使用メモリ 74,264 KB
実行使用メモリ 28,324 KB
最終ジャッジ日時 2023-09-23 22:04:10
合計ジャッジ時間 9,826 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class yukicoder02 {
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String tes = null;
		char[] peso = {48,48,48,48,48,48,48,48,48,48};
		//sysgoer(peso);
		System.out.println(peso);
		
		try {
			tes = br.readLine();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
		
		if(tes.equals("10 unlocked")){
			System.exit(0);
		}
		
		String[] tew = tes.split(" ");
		
		int i = 0;
		String tmp = null;
		int hai = 0;
		int kazu =Integer.parseInt(tew[0]);
		int kazu2 = kazu;
		
		while(true){
			peso[hai]++;
			
			
			System.out.println(peso);
			
			try {
				tes = br.readLine();
			} catch (IOException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			if(tes.equals("10 unlocked")){
				System.exit(0);
			}
			
			tew = tes.split(" ");
			kazu =Integer.parseInt(tew[0]);
			if(kazu < kazu2){
				peso[hai]--;
			}else if(kazu > kazu2){
				hai++;
				kazu2 = kazu;
			}
			
		}
		
	}
//	public static void sysgoer(char[] peso){
//		for(int i=0;i < 10;i++){
//			System.out.print(peso[i]);
//		}
//		System.out.println();
//		
//	}

}
0