結果

問題 No.627 ランダムウォークの軌跡
ユーザー Exp_iPiExp_iPi
提出日時 2018-01-07 23:03:40
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 11,360 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-08-24 23:45:26
合計ジャッジ時間 4,228 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,020 KB
testcase_01 WA -
testcase_02 AC 78 ms
15,068 KB
testcase_03 AC 78 ms
14,984 KB
testcase_04 AC 78 ms
15,064 KB
testcase_05 AC 79 ms
15,020 KB
testcase_06 AC 79 ms
15,268 KB
testcase_07 AC 80 ms
15,276 KB
testcase_08 AC 79 ms
15,076 KB
testcase_09 WA -
testcase_10 AC 80 ms
15,108 KB
testcase_11 AC 80 ms
14,984 KB
testcase_12 AC 81 ms
15,264 KB
testcase_13 WA -
testcase_14 AC 80 ms
15,256 KB
testcase_15 WA -
testcase_16 AC 79 ms
14,984 KB
testcase_17 AC 79 ms
15,244 KB
testcase_18 AC 80 ms
15,128 KB
testcase_19 WA -
testcase_20 AC 79 ms
15,312 KB
testcase_21 AC 80 ms
15,276 KB
testcase_22 AC 80 ms
15,160 KB
testcase_23 WA -
testcase_24 AC 80 ms
15,328 KB
testcase_25 AC 80 ms
15,160 KB
testcase_26 AC 80 ms
15,200 KB
testcase_27 WA -
testcase_28 AC 79 ms
15,080 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 79 ms
15,124 KB
testcase_32 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:7: warning: mismatched indentations at 'else' with 'unless' at 5
Main.rb:9: warning: mismatched indentations at 'end' with 'else' at 7
Main.rb:15: 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-2))
  hantei=1  unless (Array[k]-Array[k+1])**2==1
end
 
if hantei=0
  print("T")
else
  print("F")
end
 
0