結果

問題 No.550 夏休みの思い出(1)
ユーザー kuuso1kuuso1
提出日時 2016-09-10 17:57:21
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 5,936 ms
コンパイル使用メモリ 171,608 KB
実行使用メモリ 29,564 KB
最終ジャッジ日時 2023-09-23 03:21:06
合計ジャッジ時間 15,059 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 97 ms
25,064 KB
testcase_10 WA -
testcase_11 AC 98 ms
25,092 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 99 ms
25,184 KB
testcase_16 AC 98 ms
25,128 KB
testcase_17 AC 98 ms
25,188 KB
testcase_18 AC 98 ms
25,196 KB
testcase_19 AC 99 ms
25,132 KB
testcase_20 AC 98 ms
25,200 KB
testcase_21 AC 100 ms
25,160 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 96 ms
25,292 KB
testcase_35 AC 97 ms
27,152 KB
testcase_36 AC 96 ms
25,036 KB
testcase_37 AC 98 ms
25,188 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 98 ms
27,144 KB
testcase_44 AC 99 ms
25,160 KB
testcase_45 AC 98 ms
25,308 KB
testcase_46 AC 99 ms
27,216 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 98 ms
27,284 KB
testcase_50 AC 97 ms
25,100 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 99 ms
27,160 KB
testcase_54 AC 96 ms
23,136 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 99 ms
27,184 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

/home/judge/data/code/Main.fs(5,13): warning FS0025: Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _|]' may indicate a case not covered by the pattern(s).

ソースコード

diff #

open System
type Sol() =

    member this.Solve() = 
        let [|A; B; C|] = stdin.ReadLine().Split(' ') |> Array.map int64
        let alpha = Seq.find (fun (x:int64) -> ( x*x*x + A*x*x + B*x + C = 0L ) || ( -x*x*x + A*x*x - B*x + C = 0L )) [0L..100000L]
        
        let A2 = A + alpha
        let B2 = B + alpha*A2
        let D = A2*A2 - 4L*B2
        let sqrtD:int64 = (double D) |> sqrt |> int64
        
        [alpha; (-A2 + sqrtD)/2L; (-A2 - sqrtD)/2L ] 
        |> Seq.sort |> Seq.map string |> Seq.reduce (fun s t -> s + " " + t)
        |> printfn "%s"


let mySol = new Sol()
mySol.Solve()
0