結果
| 問題 | No.9002 FizzBuzz(テスト用) |
| ユーザー |
|
| 提出日時 | 2019-11-15 18:09:14 |
| 言語 | Swift (6.2.4) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 5,000 ms |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 763 ms |
| コンパイル使用メモリ | 141,840 KB |
| 実行使用メモリ | 9,472 KB |
| 最終ジャッジ日時 | 2026-05-24 06:43:09 |
| 合計ジャッジ時間 | 1,425 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
Main.swift:2:1: warning: using '_' to ignore the result of a Void-returning function is redundant
1 | let i = Int(readLine()!)!
2 | _ = (1...i).map {
| `- warning: using '_' to ignore the result of a Void-returning function is redundant
3 | switch ($0 % 3, $0 % 5) {
4 | case (0, 0):
ソースコード
let i = Int(readLine()!)!
_ = (1...i).map {
switch ($0 % 3, $0 % 5) {
case (0, 0):
return "FizzBuzz"
case (0, _):
return "Fizz"
case (_, 0):
return "Buzz"
case (_, _):
return "\($0)"
} }.forEach {
print($0)
}