結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
|
提出日時 | 2021-03-20 19:36:31 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 52 ms / 2,000 ms |
コード長 | 624 bytes |
コンパイル時間 | 3,429 ms |
コンパイル使用メモリ | 73,320 KB |
実行使用メモリ | 37,064 KB |
最終ジャッジ日時 | 2024-11-21 08:51:11 |
合計ジャッジ時間 | 5,799 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
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 != -1 && x != 1) { 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"); } }