結果

問題 No.135 とりあえず1次元の問題
ユーザー chike_pluschike_plus
提出日時 2019-04-04 10:27:09
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 368 bytes
コンパイル時間 5,003 ms
コンパイル使用メモリ 158,916 KB
実行使用メモリ 36,080 KB
最終ジャッジ日時 2023-08-26 09:03:35
合計ジャッジ時間 8,453 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 152 ms
35,548 KB
testcase_01 AC 66 ms
22,344 KB
testcase_02 AC 68 ms
24,584 KB
testcase_03 RE -
testcase_04 AC 66 ms
22,308 KB
testcase_05 AC 67 ms
22,324 KB
testcase_06 AC 69 ms
22,324 KB
testcase_07 AC 68 ms
24,356 KB
testcase_08 AC 66 ms
22,432 KB
testcase_09 AC 66 ms
20,296 KB
testcase_10 AC 67 ms
22,368 KB
testcase_11 AC 67 ms
24,356 KB
testcase_12 AC 75 ms
22,460 KB
testcase_13 AC 68 ms
24,416 KB
testcase_14 AC 77 ms
24,544 KB
testcase_15 AC 76 ms
22,552 KB
testcase_16 AC 77 ms
22,424 KB
testcase_17 AC 80 ms
22,496 KB
testcase_18 AC 73 ms
22,508 KB
testcase_19 AC 75 ms
22,556 KB
testcase_20 AC 76 ms
24,572 KB
testcase_21 AC 141 ms
36,080 KB
testcase_22 AC 153 ms
35,712 KB
evil01.txt AC 150 ms
37,584 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let ``No.135 とりあえず1次元の問題``() =

  let n = stdin.ReadLine() |> int
  let xn =
     stdin.ReadLine().Split(' ')
    |> Array.map (int)
    |> Array.sort

  seq {
    for i in [2..xn.Length] do
     if xn.[i-1] <> xn.[i-2] then 
      yield (xn.[i-1] - xn.[i-2]) 
  }
  |> Seq.min 
  |> stdout.WriteLine
  
``No.135 とりあえず1次元の問題``()
0