結果

問題 No.627 ランダムウォークの軌跡
ユーザー shinwisteriashinwisteria
提出日時 2018-02-15 22:45:44
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 4,382 ms
コンパイル使用メモリ 72,716 KB
実行使用メモリ 56,516 KB
最終ジャッジ日時 2023-08-28 15:26:35
合計ジャッジ時間 9,854 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,188 KB
testcase_01 AC 119 ms
56,016 KB
testcase_02 AC 121 ms
55,924 KB
testcase_03 AC 119 ms
55,884 KB
testcase_04 AC 120 ms
55,860 KB
testcase_05 AC 119 ms
56,120 KB
testcase_06 AC 120 ms
55,836 KB
testcase_07 AC 121 ms
56,012 KB
testcase_08 AC 119 ms
56,084 KB
testcase_09 AC 122 ms
55,888 KB
testcase_10 AC 121 ms
56,112 KB
testcase_11 AC 121 ms
56,104 KB
testcase_12 AC 122 ms
55,996 KB
testcase_13 AC 123 ms
56,144 KB
testcase_14 AC 124 ms
55,912 KB
testcase_15 AC 125 ms
56,156 KB
testcase_16 AC 124 ms
55,972 KB
testcase_17 AC 125 ms
56,080 KB
testcase_18 AC 126 ms
55,848 KB
testcase_19 AC 127 ms
56,488 KB
testcase_20 AC 127 ms
56,264 KB
testcase_21 AC 126 ms
56,332 KB
testcase_22 AC 126 ms
55,888 KB
testcase_23 AC 127 ms
55,860 KB
testcase_24 AC 126 ms
56,492 KB
testcase_25 AC 127 ms
55,696 KB
testcase_26 AC 127 ms
56,060 KB
testcase_27 AC 128 ms
55,832 KB
testcase_28 AC 127 ms
56,028 KB
testcase_29 AC 127 ms
56,152 KB
testcase_30 WA -
testcase_31 AC 118 ms
56,080 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;

public class RandomWalknokiseki {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int T = s.nextInt();
		Boolean ft = true;
		int[] X = new int[T];
		for(int i = 0;i < T;i++){
			X[i] = s.nextInt();
			if(i > 0){
				if(Math.abs(X[i] - X[i-1]) != 1){
					ft = false;
				}
			}
		}
		s.close();
		if(ft){
			System.out.println("T");
		}else{
			System.out.println("F");
		}
	}

}
0