結果
問題 | No.112 ややこしい鶴亀算 |
ユーザー |
|
提出日時 | 2016-04-17 19:34:05 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 343 ms / 5,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 6,100 ms |
コンパイル使用メモリ | 185,192 KB |
実行使用メモリ | 35,744 KB |
最終ジャッジ日時 | 2024-10-04 10:29:17 |
合計ジャッジ時間 | 15,799 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (210 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/
ソースコード
let a = stdin.ReadLine() |> int let l = stdin.ReadLine().Split(' ') |> Seq.map int |> Seq.groupBy id |> Seq.sortBy fst |> 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