結果

問題 No.627 ランダムウォークの軌跡
ユーザー Pump0129Pump0129
提出日時 2018-03-26 17:56:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 583 bytes
コンパイル時間 4,740 ms
コンパイル使用メモリ 71,364 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-09-07 12:46:16
合計ジャッジ時間 10,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,876 KB
testcase_01 AC 117 ms
55,544 KB
testcase_02 AC 115 ms
55,720 KB
testcase_03 AC 116 ms
55,508 KB
testcase_04 AC 122 ms
55,932 KB
testcase_05 AC 120 ms
55,484 KB
testcase_06 AC 120 ms
55,912 KB
testcase_07 AC 119 ms
55,552 KB
testcase_08 AC 120 ms
56,080 KB
testcase_09 AC 119 ms
55,828 KB
testcase_10 AC 117 ms
55,560 KB
testcase_11 AC 122 ms
55,624 KB
testcase_12 AC 118 ms
56,004 KB
testcase_13 AC 119 ms
55,756 KB
testcase_14 AC 120 ms
55,624 KB
testcase_15 AC 122 ms
55,632 KB
testcase_16 AC 122 ms
55,724 KB
testcase_17 AC 122 ms
55,680 KB
testcase_18 AC 123 ms
55,740 KB
testcase_19 AC 122 ms
55,316 KB
testcase_20 AC 123 ms
55,644 KB
testcase_21 AC 123 ms
55,812 KB
testcase_22 AC 122 ms
55,340 KB
testcase_23 AC 120 ms
55,552 KB
testcase_24 AC 128 ms
55,548 KB
testcase_25 AC 125 ms
55,908 KB
testcase_26 AC 123 ms
55,580 KB
testcase_27 AC 123 ms
55,508 KB
testcase_28 AC 125 ms
55,680 KB
testcase_29 AC 120 ms
55,596 KB
testcase_30 AC 120 ms
55,684 KB
testcase_31 AC 121 ms
55,564 KB
testcase_32 AC 116 ms
55,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no627;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int cnt = Integer.parseInt(scan.nextLine());
		
		int revnum = 0;
		boolean isend = false;
		for (int i = 0; i < cnt; i++) {
			int num = Integer.parseInt(scan.nextLine());
			if ((revnum - num) * (revnum - num) != 1) {
				System.out.println("F");
				isend = true;
				break;
			}
			revnum = num;
		}
		
		scan.close();
		
		if(!isend) {
			System.out.println("T");
		}
		
	}
}
0