結果

問題 No.550 夏休みの思い出(1)
ユーザー kuuso1kuuso1
提出日時 2016-09-10 17:58:41
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 5,826 ms
コンパイル使用メモリ 165,844 KB
実行使用メモリ 63,928 KB
最終ジャッジ日時 2023-09-23 03:21:35
合計ジャッジ時間 18,051 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 201 ms
57,912 KB
testcase_02 WA -
testcase_03 AC 201 ms
55,748 KB
testcase_04 WA -
testcase_05 AC 203 ms
57,812 KB
testcase_06 WA -
testcase_07 AC 205 ms
57,952 KB
testcase_08 WA -
testcase_09 AC 185 ms
55,776 KB
testcase_10 WA -
testcase_11 AC 189 ms
53,688 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 184 ms
57,784 KB
testcase_16 AC 185 ms
57,804 KB
testcase_17 AC 184 ms
55,764 KB
testcase_18 AC 184 ms
55,900 KB
testcase_19 AC 183 ms
55,792 KB
testcase_20 AC 182 ms
53,764 KB
testcase_21 AC 183 ms
55,808 KB
testcase_22 AC 196 ms
53,672 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 191 ms
55,712 KB
testcase_27 AC 191 ms
59,824 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 184 ms
57,772 KB
testcase_35 AC 185 ms
57,740 KB
testcase_36 AC 184 ms
55,660 KB
testcase_37 AC 185 ms
57,768 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 185 ms
55,712 KB
testcase_44 AC 187 ms
55,764 KB
testcase_45 AC 185 ms
57,780 KB
testcase_46 AC 185 ms
57,856 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 185 ms
59,824 KB
testcase_50 AC 184 ms
57,812 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 188 ms
57,912 KB
testcase_54 AC 186 ms
53,656 KB
testcase_55 WA -
testcase_56 WA -
testcase_57 AC 185 ms
53,704 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..1000000L]
        
        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