結果

問題 No.627 ランダムウォークの軌跡
ユーザー htensaihtensai
提出日時 2019-11-14 08:58:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 373 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 74,028 KB
実行使用メモリ 57,640 KB
最終ジャッジ日時 2023-10-21 19:55:26
合計ジャッジ時間 7,726 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,092 KB
testcase_01 AC 129 ms
57,300 KB
testcase_02 AC 129 ms
57,304 KB
testcase_03 AC 128 ms
57,360 KB
testcase_04 AC 129 ms
57,472 KB
testcase_05 AC 131 ms
57,424 KB
testcase_06 AC 132 ms
57,460 KB
testcase_07 AC 131 ms
57,264 KB
testcase_08 AC 132 ms
57,420 KB
testcase_09 AC 132 ms
57,516 KB
testcase_10 AC 132 ms
57,504 KB
testcase_11 AC 128 ms
57,204 KB
testcase_12 AC 130 ms
57,628 KB
testcase_13 AC 126 ms
57,540 KB
testcase_14 AC 137 ms
57,368 KB
testcase_15 AC 136 ms
57,604 KB
testcase_16 AC 132 ms
57,560 KB
testcase_17 AC 133 ms
57,640 KB
testcase_18 AC 134 ms
57,624 KB
testcase_19 AC 133 ms
57,424 KB
testcase_20 AC 136 ms
57,600 KB
testcase_21 AC 141 ms
57,472 KB
testcase_22 AC 138 ms
57,620 KB
testcase_23 AC 131 ms
57,456 KB
testcase_24 AC 136 ms
57,552 KB
testcase_25 AC 134 ms
57,336 KB
testcase_26 AC 139 ms
57,576 KB
testcase_27 AC 131 ms
57,444 KB
testcase_28 AC 140 ms
57,568 KB
testcase_29 AC 134 ms
57,380 KB
testcase_30 AC 136 ms
57,396 KB
testcase_31 AC 129 ms
57,464 KB
testcase_32 AC 129 ms
57,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		int prev = 0;
		for (int i = 0; i < t; i++) {
		    int x = sc.nextInt();
		    if (Math.abs(prev - x) != 1) {
		        System.out.println("F");
		        return;
		    }
		    prev = x;
		}
		System.out.println("T");
	}
}
0