結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
|
提出日時 | 2021-03-20 19:34:53 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 613 bytes |
コンパイル時間 | 3,345 ms |
コンパイル使用メモリ | 74,592 KB |
実行使用メモリ | 50,324 KB |
最終ジャッジ日時 | 2024-11-21 08:50:02 |
合計ジャッジ時間 | 6,574 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 WA * 1 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No00000627_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { int t = Integer.parseInt(br.readLine()); int x = Integer.parseInt(br.readLine()); if(x == 0) { System.out.println("F"); return; } for(int i = 1; i < t; i++) { int n = Integer.parseInt(br.readLine()); if(x - n != -1 && x - n != 1) { System.out.println("F"); return; } x = n; } System.out.println("T"); } }