結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
tak
|
| 提出日時 | 2019-06-29 05:48:52 |
| 言語 | F# (F# 10.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 815 bytes |
| 記録 | |
| コンパイル時間 | 10,299 ms |
| コンパイル使用メモリ | 197,340 KB |
| 実行使用メモリ | 40,576 KB |
| 最終ジャッジ日時 | 2026-03-23 09:21:54 |
| 合計ジャッジ時間 | 15,313 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 5 WA * 6 RE * 11 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (350 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
module Yuki
open System
let solve ss =
let num2Lis n =
let rec f acc x =
if x >= 10L then
f ((x % 10L) :: acc ) (x / 10L)
else
x :: acc
f [] n
let horoscope n =
let rec f =
function
| [] -> failwith ""
| x :: [] -> x
| xs ->
let ns =
xs
|> List.pairwise
|> List.map ((fun (a, b) -> a + b) >> num2Lis >> List.sum)
f ns
let ns = num2Lis n
f ns
let ns = ss |> List.map int64
ns |> List.map horoscope
let T = Console.ReadLine() |> int
let S = List.init T (fun _ -> Console.ReadLine())
solve S
|> List.iter Console.WriteLine
tak