結果

問題 No.51 やる気の問題
ユーザー chike_plus
提出日時 2019-03-27 21:46:56
言語 F#
(F# 4.0)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 336 bytes
コンパイル時間 8,527 ms
コンパイル使用メモリ 188,460 KB
実行使用メモリ 32,512 KB
最終ジャッジ日時 2024-10-11 06:14:38
合計ジャッジ時間 10,905 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (232 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 ``No.51 やる気の問題``() =
  let rec loop y x=
    match y with
    | 0 -> x
    | 1 -> x
    | _ -> x - int ( decimal(x) / ( decimal y * decimal y) )
          |> int
          |> loop (y-1)

  let w = stdin.ReadLine() |> int
  let d = stdin.ReadLine() |> int

  loop d w
  |> stdout.WriteLine

``No.51 やる気の問題``()
0