結果

問題 No.627 ランダムウォークの軌跡
ユーザー trkage_tedtrkage_ted
提出日時 2018-01-13 20:41:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 711 bytes
コンパイル時間 2,347 ms
コンパイル使用メモリ 72,536 KB
実行使用メモリ 49,616 KB
最終ジャッジ日時 2023-08-25 16:00:49
合計ジャッジ時間 4,564 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,116 KB
testcase_01 AC 42 ms
49,608 KB
testcase_02 AC 43 ms
49,412 KB
testcase_03 AC 42 ms
49,364 KB
testcase_04 AC 42 ms
49,496 KB
testcase_05 AC 42 ms
49,356 KB
testcase_06 AC 42 ms
49,200 KB
testcase_07 AC 42 ms
49,616 KB
testcase_08 AC 42 ms
49,368 KB
testcase_09 AC 43 ms
49,168 KB
testcase_10 AC 43 ms
49,192 KB
testcase_11 AC 42 ms
49,196 KB
testcase_12 AC 42 ms
49,104 KB
testcase_13 AC 42 ms
49,352 KB
testcase_14 AC 42 ms
49,328 KB
testcase_15 AC 42 ms
49,104 KB
testcase_16 AC 43 ms
47,620 KB
testcase_17 AC 43 ms
49,208 KB
testcase_18 AC 42 ms
49,180 KB
testcase_19 AC 42 ms
49,156 KB
testcase_20 AC 42 ms
49,364 KB
testcase_21 AC 42 ms
49,300 KB
testcase_22 AC 43 ms
49,216 KB
testcase_23 AC 42 ms
49,444 KB
testcase_24 AC 42 ms
49,276 KB
testcase_25 AC 43 ms
49,260 KB
testcase_26 AC 42 ms
49,196 KB
testcase_27 AC 43 ms
49,392 KB
testcase_28 AC 42 ms
49,236 KB
testcase_29 AC 42 ms
49,192 KB
testcase_30 AC 43 ms
49,084 KB
testcase_31 AC 42 ms
49,284 KB
testcase_32 AC 43 ms
49,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main(String args[]) throws IOException {

		BufferedReader inReader = new BufferedReader(new InputStreamReader(System.in));

		String input = inReader.readLine();
		Integer length = Integer.valueOf(input);

		int[] checkValue = new int[length + 1];
		checkValue[0] = 0;
		for (int i = 0; i < length; i++)
			checkValue[i + 1] = Integer.valueOf(inReader.readLine());

		for (int i = 0; i < checkValue.length - 1; i++)
		{

			if (Math.abs(checkValue[i] - checkValue[i + 1]) != 1)
			{
				System.out.println("F");
				return;
			}
		}

		System.out.println("T");
		return;
	}
}
0