結果

問題 No.627 ランダムウォークの軌跡
ユーザー misk703misk703
提出日時 2018-05-10 12:45:25
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 544 bytes
コンパイル時間 3,401 ms
コンパイル使用メモリ 72,548 KB
実行使用メモリ 56,448 KB
最終ジャッジ日時 2023-09-10 11:35:36
合計ジャッジ時間 8,948 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,100 KB
testcase_01 AC 120 ms
56,028 KB
testcase_02 AC 121 ms
56,168 KB
testcase_03 AC 122 ms
56,016 KB
testcase_04 AC 123 ms
56,168 KB
testcase_05 AC 121 ms
55,760 KB
testcase_06 AC 122 ms
56,104 KB
testcase_07 AC 124 ms
56,060 KB
testcase_08 AC 123 ms
55,856 KB
testcase_09 AC 123 ms
55,796 KB
testcase_10 AC 124 ms
56,096 KB
testcase_11 AC 124 ms
55,812 KB
testcase_12 AC 128 ms
55,792 KB
testcase_13 AC 122 ms
55,872 KB
testcase_14 AC 126 ms
55,712 KB
testcase_15 AC 126 ms
56,300 KB
testcase_16 AC 127 ms
56,172 KB
testcase_17 AC 126 ms
56,024 KB
testcase_18 AC 127 ms
55,780 KB
testcase_19 AC 125 ms
55,928 KB
testcase_20 AC 132 ms
55,928 KB
testcase_21 AC 129 ms
55,912 KB
testcase_22 AC 129 ms
55,732 KB
testcase_23 AC 122 ms
55,896 KB
testcase_24 AC 129 ms
55,884 KB
testcase_25 AC 130 ms
56,252 KB
testcase_26 AC 129 ms
56,044 KB
testcase_27 AC 123 ms
53,648 KB
testcase_28 AC 131 ms
55,744 KB
testcase_29 AC 123 ms
55,740 KB
testcase_30 AC 123 ms
56,388 KB
testcase_31 AC 123 ms
56,020 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;

public class Rumdum {

    public static void main(String[] args) {
	ArrayList<Integer> list = new ArrayList<>();
	Scanner scanner = new Scanner(System.in);

	int T = scanner.nextInt();
	int buff = scanner.nextInt();
	if(buff == 0){
	    System.out.println("F");
	    return;
	}
	for(int i=0;i<T-1;i++){
	    int t = scanner.nextInt();
	    if(buff+1 == t || buff-1 == t){
		buff = t;
	    }else{
		System.out.println("F");
		return;
	    }
	}
	System.out.println("T");
	return;

    }

}
0