結果

問題 No.627 ランダムウォークの軌跡
ユーザー GodNegoto
提出日時 2019-11-28 15:01:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 442 bytes
コンパイル時間 3,315 ms
コンパイル使用メモリ 74,880 KB
実行使用メモリ 41,692 KB
最終ジャッジ日時 2024-11-17 23:00:04
合計ジャッジ時間 8,548 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.*;

public class sample7 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		list.add(0);
		for(int i = 1; i <= T; i++) {
			list.add(sc.nextInt());
			if(Math.abs(list.get(i-1) - list.get(i)) == 1) {
				
			}
			else {
				System.out.println("F");
				return;
			}
		}
		System.out.println("T");
	}
}
0