結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2017-03-31 22:51:34 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| コンパイル時間 | 42 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-07-07 05:05:06 |
| 合計ジャッジ時間 | 966 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_i
three = "d".ord - "a".ord
five = "f".ord - "a".ord
for i in ("b".ord - "a".ord )..n do
if i % three == 0 and i % five == 0 then
puts "FizzBuzz"
elsif i % three == 0
puts "Fizz"
elsif i % five == 0
puts "Buzz"
else
puts i
end
end
koyumeishi