結果

問題 No.112 ややこしい鶴亀算
ユーザー regeregeregerege
提出日時 2016-04-17 19:32:13
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 7,142 ms
コンパイル使用メモリ 191,528 KB
実行使用メモリ 35,652 KB
最終ジャッジ日時 2024-04-15 02:16:54
合計ジャッジ時間 16,833 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 355 ms
34,996 KB
testcase_01 AC 352 ms
35,540 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 350 ms
35,632 KB
testcase_05 AC 355 ms
35,636 KB
testcase_06 WA -
testcase_07 AC 358 ms
34,744 KB
testcase_08 AC 355 ms
35,652 KB
testcase_09 AC 351 ms
35,540 KB
testcase_10 WA -
testcase_11 AC 359 ms
35,212 KB
testcase_12 AC 352 ms
35,100 KB
testcase_13 AC 355 ms
35,256 KB
testcase_14 AC 354 ms
35,372 KB
testcase_15 WA -
testcase_16 AC 353 ms
34,964 KB
testcase_17 AC 353 ms
35,092 KB
testcase_18 AC 356 ms
35,496 KB
testcase_19 AC 356 ms
35,544 KB
testcase_20 AC 350 ms
35,512 KB
testcase_21 WA -
testcase_22 AC 354 ms
35,080 KB
testcase_23 AC 353 ms
35,092 KB
testcase_24 AC 353 ms
35,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (245 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

let a = stdin.ReadLine() |> int
let l =
    stdin.ReadLine().Split(' ')
    |> Seq.map int
    |> Seq.groupBy id
    |> Seq.map (fun (a,b) -> a,Seq.length b)
    |> Seq.toList
let l2 = List.map snd l
let x,y =
    if l.Length = 2 then l2.[1],l2.[0]
    else
        let s = fst l.[0]
        if (s+2)/2=a then a,0 else 0,a
printfn "%d %d" x y
0