結果
| 問題 | No.627 ランダムウォークの軌跡 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-26 17:56:54 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| + 353µs | |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 2,722 ms |
| コンパイル使用メモリ | 83,840 KB |
| 実行使用メモリ | 42,964 KB |
| 最終ジャッジ日時 | 2026-07-29 16:58:06 |
| 合計ジャッジ時間 | 5,089 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
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");
}
}
}