teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コードがまちがっていました。

2017/05/10 14:21

投稿

manman
manman

スコア233

title CHANGED
File without changes
body CHANGED
@@ -2,10 +2,10 @@
2
2
  ただし、同じ数字が二回以上出てきたら、0をかえすことにします。
3
3
 
4
4
  ```ruby
5
- def count_distinct_numbers(n)
5
+ def count_distinct_numbers(ary)
6
6
  ???
7
7
  end
8
8
 
9
- p count_distinct_numbers([1, 2, 3, 5, 8] #=> 5
9
+ p count_distinct_numbers([1, 2, 3, 5, 8]) #=> 5
10
- p count_distinct_numbers([1, 1, 2, 3, 5, 8] #=> 0
10
+ p count_distinct_numbers([1, 1, 2, 3, 5, 8]) #=> 0
11
11
  ```