結果

問題 No.627 ランダムウォークの軌跡
ユーザー YamaKasaYamaKasa
提出日時 2018-05-08 20:38:31
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 498 bytes
コンパイル時間 2,021 ms
コンパイル使用メモリ 71,052 KB
実行使用メモリ 57,424 KB
最終ジャッジ日時 2023-09-10 11:06:56
合計ジャッジ時間 7,741 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,616 KB
testcase_01 AC 123 ms
55,144 KB
testcase_02 AC 124 ms
55,564 KB
testcase_03 AC 127 ms
55,728 KB
testcase_04 AC 127 ms
55,820 KB
testcase_05 AC 126 ms
55,824 KB
testcase_06 AC 126 ms
55,500 KB
testcase_07 AC 127 ms
55,680 KB
testcase_08 AC 129 ms
55,860 KB
testcase_09 AC 125 ms
55,896 KB
testcase_10 AC 129 ms
55,796 KB
testcase_11 AC 128 ms
55,520 KB
testcase_12 AC 129 ms
55,628 KB
testcase_13 AC 130 ms
53,256 KB
testcase_14 AC 130 ms
55,816 KB
testcase_15 AC 129 ms
55,496 KB
testcase_16 AC 130 ms
55,956 KB
testcase_17 AC 133 ms
55,600 KB
testcase_18 AC 131 ms
55,496 KB
testcase_19 AC 133 ms
55,044 KB
testcase_20 AC 131 ms
55,556 KB
testcase_21 AC 134 ms
55,300 KB
testcase_22 AC 132 ms
55,748 KB
testcase_23 AC 131 ms
55,508 KB
testcase_24 AC 131 ms
55,952 KB
testcase_25 AC 132 ms
55,884 KB
testcase_26 AC 131 ms
56,144 KB
testcase_27 AC 130 ms
55,440 KB
testcase_28 AC 130 ms
57,424 KB
testcase_29 AC 132 ms
55,352 KB
testcase_30 AC 124 ms
55,420 KB
testcase_31 AC 127 ms
55,504 KB
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int T = scan.nextInt();
		int []X = new int[T];
		for(int i = 0; i < T; i++) {
			X[i] = scan.nextInt();
		}
		scan.close();
		if(X[0] == 0) {
			System.out.println("F");
			System.exit(0);
		}
		for(int i = 0; i < T - 1; i++) {
			int k = X[i + 1] - X[i];
			if(k * k != 1) {
				System.out.println("F");
				System.exit(0);
			}
		}
		System.out.println("T");
	}
}
0