結果

問題 No.289 数字を全て足そう
ユーザー vain0vain0
提出日時 2015-10-16 22:37:12
言語 F#
(F# 4.0)
結果
AC  
実行時間 340 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 15,711 ms
コンパイル使用メモリ 184,220 KB
実行使用メモリ 34,596 KB
最終ジャッジ日時 2024-04-16 19:14:59
合計ジャッジ時間 21,320 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 333 ms
34,416 KB
testcase_01 AC 339 ms
34,344 KB
testcase_02 AC 334 ms
34,288 KB
testcase_03 AC 334 ms
33,448 KB
testcase_04 AC 334 ms
34,412 KB
testcase_05 AC 336 ms
34,416 KB
testcase_06 AC 339 ms
34,340 KB
testcase_07 AC 337 ms
34,336 KB
testcase_08 AC 338 ms
33,332 KB
testcase_09 AC 336 ms
34,292 KB
testcase_10 AC 334 ms
34,160 KB
testcase_11 AC 333 ms
34,332 KB
testcase_12 AC 335 ms
33,604 KB
testcase_13 AC 334 ms
33,844 KB
testcase_14 AC 339 ms
33,796 KB
testcase_15 AC 338 ms
34,332 KB
testcase_16 AC 333 ms
34,248 KB
testcase_17 AC 330 ms
33,848 KB
testcase_18 AC 336 ms
34,224 KB
testcase_19 AC 330 ms
34,260 KB
testcase_20 AC 337 ms
33,488 KB
testcase_21 AC 337 ms
34,204 KB
testcase_22 AC 336 ms
33,948 KB
testcase_23 AC 340 ms
34,596 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (434 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 #

open System
open System.Text
open System.Collections.Generic

let solve s =
  s
  |> Seq.choose (fun c -> if Char.IsDigit c then c |> Char.GetNumericValue |> int |> Some else None)
  |> Seq.sum

[<EntryPoint>]
let main argv =
  let s = Console.ReadLine()
  printfn "%d" <| solve s

  //exit
  0
0