結果

問題 No.316 もっと刺激的なFizzBuzzをください
コンテスト
ユーザー mergerintarou
提出日時 2017-11-07 11:45:09
言語 Ruby
(4.0.2)
コンパイル:
ruby -w -c _filename_
実行:
ruby _filename_
結果
RE  
実行時間 -
コード長 182 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 69 ms
コンパイル使用メモリ 9,088 KB
実行使用メモリ 22,400 KB
最終ジャッジ日時 2026-05-18 01:59:18
合計ジャッジ時間 6,347 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: '/' after local variable or literal is interpreted as binary operator even though it seems like regexp literal
Syntax OK

ソースコード

diff #
raw source code

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