結果

問題 No.627 ランダムウォークの軌跡
ユーザー misk703misk703
提出日時 2018-05-10 12:47:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 465 bytes
コンパイル時間 3,777 ms
コンパイル使用メモリ 72,460 KB
実行使用メモリ 56,088 KB
最終ジャッジ日時 2023-09-10 11:35:49
合計ジャッジ時間 8,687 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
56,028 KB
testcase_01 AC 122 ms
56,088 KB
testcase_02 AC 124 ms
56,036 KB
testcase_03 AC 124 ms
55,860 KB
testcase_04 AC 123 ms
55,708 KB
testcase_05 AC 123 ms
55,596 KB
testcase_06 AC 124 ms
56,052 KB
testcase_07 AC 124 ms
55,760 KB
testcase_08 AC 124 ms
55,788 KB
testcase_09 AC 125 ms
55,844 KB
testcase_10 AC 126 ms
55,460 KB
testcase_11 AC 126 ms
55,552 KB
testcase_12 AC 127 ms
55,848 KB
testcase_13 AC 123 ms
55,960 KB
testcase_14 AC 126 ms
55,720 KB
testcase_15 AC 125 ms
55,840 KB
testcase_16 AC 128 ms
56,056 KB
testcase_17 AC 127 ms
55,548 KB
testcase_18 AC 129 ms
56,008 KB
testcase_19 AC 125 ms
55,744 KB
testcase_20 AC 128 ms
55,900 KB
testcase_21 AC 128 ms
55,764 KB
testcase_22 AC 128 ms
55,708 KB
testcase_23 AC 121 ms
55,788 KB
testcase_24 AC 128 ms
55,460 KB
testcase_25 AC 128 ms
55,808 KB
testcase_26 AC 129 ms
56,024 KB
testcase_27 AC 122 ms
55,944 KB
testcase_28 AC 129 ms
55,800 KB
testcase_29 AC 127 ms
55,548 KB
testcase_30 AC 131 ms
55,764 KB
testcase_31 AC 130 ms
55,796 KB
testcase_32 AC 131 ms
55,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Scanner;

public class Rumdum {

    public static void main(String[] args) {
	ArrayList<Integer> list = new ArrayList<>();
	Scanner scanner = new Scanner(System.in);

	int T = scanner.nextInt();
	int buff = 0;

	for(int i=0;i<T;i++){
	    int t = scanner.nextInt();
	    if(buff+1 == t || buff-1 == t){
		buff = t;
	    }else{
		System.out.println("F");
		return;
	    }
	}
	System.out.println("T");
	return;

    }

}
0