結果
問題 | No.3022 縛りFizzBuzz (Easy) |
ユーザー | nobigomu |
提出日時 | 2018-05-31 17:29:58 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 60 ms / 2,000 ms |
コード長 | 303 bytes |
コンパイル時間 | 3,325 ms |
コンパイル使用メモリ | 155,260 KB |
実行使用メモリ | 24,404 KB |
最終ジャッジ日時 | 2023-09-12 20:59:29 |
合計ジャッジ時間 | 4,586 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 59 ms
22,268 KB |
testcase_01 | AC | 59 ms
22,268 KB |
testcase_02 | AC | 60 ms
24,404 KB |
testcase_03 | AC | 59 ms
22,276 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved. /home/judge/data/code/Main.fs(4,5): warning FS0058: Possible incorrect indentation: this token is offside of context started at position (3:42). Try indenting this token further or using standard formatting conventions. /home/judge/data/code/Main.fs(4,5): warning FS0058: Possible incorrect indentation: this token is offside of context started at position (3:42). Try indenting this token further or using standard formatting conventions.
ソースコード
let Z,O = String.length "",String.length "_" let F,B = O+O+O,O+O+O+O+O (stdin.ReadLine >> int >> fun n -> seq { for i in O..n -> match (i%F=Z,i%B=Z) with | (true,true) -> "FizzBuzz" | (true,_) -> "Fizz" | (_,true) -> "Buzz" | (_,_) -> i.ToString () }) () |> Seq.iter stdout.WriteLine