結果

問題 No.207 世界のなんとか
ユーザー chike_pluschike_plus
提出日時 2019-03-19 00:48:12
言語 F#
(F# 4.0)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 422 bytes
コンパイル時間 5,949 ms
コンパイル使用メモリ 159,588 KB
実行使用メモリ 25,072 KB
最終ジャッジ日時 2023-09-26 16:49:37
合計ジャッジ時間 8,465 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
22,908 KB
testcase_01 AC 89 ms
20,884 KB
testcase_02 AC 88 ms
22,908 KB
testcase_03 AC 87 ms
22,976 KB
testcase_04 AC 87 ms
22,924 KB
testcase_05 AC 87 ms
23,020 KB
testcase_06 AC 88 ms
24,916 KB
testcase_07 AC 86 ms
22,940 KB
testcase_08 AC 88 ms
22,872 KB
testcase_09 AC 89 ms
24,848 KB
testcase_10 AC 88 ms
20,976 KB
testcase_11 AC 87 ms
22,984 KB
testcase_12 AC 88 ms
22,916 KB
testcase_13 AC 86 ms
23,032 KB
testcase_14 AC 89 ms
23,036 KB
testcase_15 AC 90 ms
25,072 KB
testcase_16 AC 87 ms
23,160 KB
testcase_17 AC 88 ms
22,936 KB
testcase_18 AC 63 ms
22,452 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let A, B = Console.ReadLine().Split(' ')
           |> fun s -> (s.[0] |> int , s.[1] |> int)

let ( |Multiple3|Number3|Number| ) n =
  match ( n % 3 ) , ( string n ).Contains("3") with
  | 0 , _    -> Multiple3
  | _ , true -> Number3
  | _ , false-> Number
  
let fizzBuzz n =
  match n with
  | Multiple3 -> printfn "%i" n
  | Number3   -> printfn "%i" n
  | Number    -> ()

[A..B]
|> List.iter (fizzBuzz)
0