結果
| 問題 |
No.627 ランダムウォークの軌跡
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-15 16:29:46 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 601 bytes |
| コンパイル時間 | 112 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-24 02:37:14 |
| 合計ジャッジ時間 | 1,901 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
ソースコード
input_count = int(input())
current_place = 0
before_place = 0
answer = True
for i in range(input_count):
input_number = int(input())
if answer == False:
continue
if i == 0 and input_number != 1 and input_number != -1:
answer = False
if i == 0:
before_place = input_number
continue
current_place = input_number
if current_place == before_place + 1 or current_place == before_place - 1:
answer = True
else:
answer = False
continue
before_place = current_place
if answer:
print("T")
else:
print("F")