結果

問題 No.627 ランダムウォークの軌跡
ユーザー Exp_iPiExp_iPi
提出日時 2018-01-07 22:59:10
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 659 ms
コンパイル使用メモリ 11,464 KB
実行使用メモリ 15,376 KB
最終ジャッジ日時 2023-08-24 23:44:13
合計ジャッジ時間 5,092 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,112 KB
testcase_01 WA -
testcase_02 AC 80 ms
15,268 KB
testcase_03 AC 78 ms
15,136 KB
testcase_04 AC 79 ms
15,280 KB
testcase_05 AC 79 ms
15,124 KB
testcase_06 AC 79 ms
15,260 KB
testcase_07 AC 79 ms
15,228 KB
testcase_08 AC 80 ms
15,116 KB
testcase_09 WA -
testcase_10 AC 78 ms
15,068 KB
testcase_11 AC 79 ms
15,048 KB
testcase_12 AC 78 ms
15,288 KB
testcase_13 WA -
testcase_14 AC 79 ms
15,252 KB
testcase_15 WA -
testcase_16 AC 78 ms
15,248 KB
testcase_17 AC 79 ms
15,152 KB
testcase_18 AC 78 ms
15,236 KB
testcase_19 WA -
testcase_20 AC 80 ms
15,076 KB
testcase_21 AC 78 ms
15,020 KB
testcase_22 AC 79 ms
15,036 KB
testcase_23 WA -
testcase_24 AC 78 ms
15,200 KB
testcase_25 AC 78 ms
15,112 KB
testcase_26 AC 79 ms
15,132 KB
testcase_27 WA -
testcase_28 AC 79 ms
15,052 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 79 ms
15,048 KB
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:8: warning: mismatched indentations at 'else' with 'unless' at 6
Main.rb:10: warning: mismatched indentations at 'end' with 'else' at 8
Main.rb:16: warning: found `= literal' in conditional, should be ==
Syntax OK

ソースコード

diff #

T = gets.to_i
Array = []
T.times { Array << gets.to_i }
#print(Array)
unless Array[0] =1 or Array[0] =-1
  hantei=1
 else
  hantei=0
end

for k in (0..(T-1))
  hantei=1  unless Array[k]-Array[k+1]=1
end
 
if hantei=0
  print("T")
else
  print("F")
end
 
0