結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー DrqYuto
提出日時 2019-12-14 19:27:35
言語 Ruby
(3.4.1)
結果
AC  
実行時間 91 ms / 1,000 ms
コード長 155 bytes
コンパイル時間 212 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-06-28 03:20:17
合計ジャッジ時間 4,004 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: `:' after local variable or literal is interpreted as binary operator
Main.rb:2: warning: even though it seems like symbol literal
Main.rb:1: warning: assigned but unused variable - a
Main.rb:1: warning: assigned but unused variable - b
Main.rb:1: warning: assigned but unused variable - c
Main.rb:1: warning: assigned but unused variable - d
Main.rb:1: warning: assigned but unused variable - e
Syntax OK

ソースコード

diff #

s=(a,b,c,d,e=gets.split.map(&:to_i))
p s.map{|x| (x % 15).zero? ? :FizzBuzz : (x % 3).zero? ? :Fizz : (x % 5).zero? ? :Buzz :x}.map(&:to_s).map(&:size).sum
0