結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー mergerintarou
提出日時 2017-11-07 11:45:09
言語 Ruby
(3.4.1)
結果
RE  
実行時間 -
コード長 182 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-11-24 04:36:34
合計ジャッジ時間 4,306 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: `/' after local variable or literal is interpreted as binary operator
Main.rb:3: warning: even though it seems like regexp literal
Syntax OK

ソースコード

diff #

n = gets
p,q,r = gets.split
np,nq,nr = n / p,n /q,n / r
npcq,nqcr,nrcp = n / (p * q),n / (q * r),n / (r * p)
npcqcr = n / (p * q * r)
puts np + nq + nr - npcq - nqcr - nrcp + npcqcr
0