結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-21 00:04:37 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 2,000 ms |
| コード長 | 541 bytes |
| 記録 | |
| コンパイル時間 | 14,462 ms |
| コンパイル使用メモリ | 202,784 KB |
| 実行使用メモリ | 59,136 KB |
| 最終ジャッジ日時 | 2026-06-04 01:39:49 |
| 合計ジャッジ時間 | 15,681 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 22 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (267 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
module Main
open System
let t = Console.ReadLine() |> int
let ss =
[for _ in 1..t ->
[for c in Console.ReadLine() -> String.Concat([c]) |> int]
]
let rec calc = function
| (x :: y :: zs) ->
let xy = x + y
let r = xy / 10
let m = xy % 10
let n =
if r > 0 then
r + m
else
m
n :: calc (y :: zs)
| _ -> []
let rec solve = function
| [x] -> x
| xs -> solve <| calc xs
for s in ss do
Console.WriteLine(solve s)