結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー LeonardoneLeonardone
提出時間 2016-09-15 00:31:05
言語 Ruby
結果
AC  
実行時間 80 ms
コード長 2,297 Byte
コンパイル時間 78 ms
実行使用メモリ 15,336 KB

テストケース

テストケース表示
入力 結果 実行時間
challenge01.txt AC 78 ms
15,028 KB
challenge02.txt AC 78 ms
15,276 KB
challenge03.txt AC 80 ms
15,196 KB
hand1.txt AC 78 ms
15,276 KB
hand2.txt AC 78 ms
15,336 KB
hand3.txt AC 78 ms
15,132 KB
hand4.txt AC 78 ms
15,020 KB
hand5.txt AC 79 ms
15,084 KB
hand6.txt AC 79 ms
15,064 KB
hand7.txt AC 77 ms
15,188 KB
hand8.txt AC 78 ms
15,124 KB
hand9.txt AC 77 ms
15,184 KB
rand1.txt AC 77 ms
15,028 KB
rand2.txt AC 78 ms
15,140 KB
rand3.txt AC 78 ms
15,280 KB
rand4.txt AC 78 ms
15,032 KB
rand5.txt AC 78 ms
15,284 KB
rand6.txt AC 77 ms
15,108 KB
rand7.txt AC 78 ms
15,064 KB
rand8.txt AC 79 ms
15,084 KB
rand9.txt AC 78 ms
15,068 KB
rand10.txt AC 78 ms
15,152 KB
rand11.txt AC 78 ms
15,232 KB
rand12.txt AC 78 ms
15,124 KB
rand13.txt AC 78 ms
15,248 KB
rand14.txt AC 78 ms
15,132 KB
sample1.txt AC 77 ms
15,116 KB
sample2.txt AC 77 ms
15,124 KB
sample3.txt AC 78 ms
15,088 KB
sample4.txt AC 78 ms
15,260 KB
system_test1.txt AC 78 ms
15,120 KB
system_test2.txt AC 80 ms
15,268 KB
system_test3.txt AC 80 ms
15,236 KB
system_test4.txt AC 78 ms
15,116 KB
system_test5.txt AC 78 ms
15,284 KB
system_test6.txt AC 78 ms
15,272 KB
system_test7.txt AC 78 ms
15,252 KB
テストケース一括ダウンロード

Diffソースコード

diff #
*** #64145
--- #117315

***************
*** 2,7 ****
--- 2,10 ----
  # yukicoder My Practice
  # author: Leonardone @ NEETSDKASU
  
+ #解説読後
+ # リジャッジ落ちからテキトー
+ 
  def gi(); gets.to_i; end
  def gis(); gets.chomp.split.map(&:to_i); end
  
***************
*** 63,78 ****
  ca_cnt = n.div(c.lcm(a)).floor
  abc_cnt = n.div(a.lcm(b.lcm(c))).floor
  
! answer = 
!     if b % a == 0 && c % a == 0
!         a_cnt
!     elsif c % b == 0 || c % a == 0
!         a_cnt + b_cnt - ab_cnt
!     elsif b % a == 0
!         a_cnt + c_cnt - bc_cnt
!     else
!         a_cnt + b_cnt + c_cnt - (ab_cnt + bc_cnt + ca_cnt) + abc_cnt
!     end
  
  puts answer
  
--- 66,73 ----
  ca_cnt = n.div(c.lcm(a)).floor
  abc_cnt = n.div(a.lcm(b.lcm(c))).floor
  
! answer = a_cnt + b_cnt + c_cnt - (ab_cnt + bc_cnt + ca_cnt) + abc_cnt
! 
  
  puts answer