結果

問題 No.185 和風
ユーザー regeregeregerege
提出日時 2017-04-15 16:14:16
言語 F#
(F# 4.0)
結果
AC  
実行時間 88 ms / 1,000 ms
コード長 246 bytes
コンパイル時間 4,759 ms
コンパイル使用メモリ 159,712 KB
実行使用メモリ 25,072 KB
最終ジャッジ日時 2023-09-25 22:16:21
合計ジャッジ時間 5,720 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
23,060 KB
testcase_01 AC 87 ms
22,964 KB
testcase_02 AC 88 ms
25,048 KB
testcase_03 AC 88 ms
25,068 KB
testcase_04 AC 87 ms
22,984 KB
testcase_05 AC 86 ms
24,992 KB
testcase_06 AC 87 ms
25,072 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let N = stdin.ReadLine() |> int
let r() = let arr = stdin.ReadLine().Split(' ') |> Array.map int in arr.[1] - arr.[0]
let arr = [ for x in 1..N -> r() ]
let a = arr.[0]
if List.forall ((=)a) arr && arr.[0] > 0 then arr.[0]
else -1
|> printfn "%d"
0