回答編集履歴
2
typo修正
answer
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
var integerArray = Array(repeating: 0, count: Length)
|
19
19
|
|
20
20
|
integerArray[0] = Int(arc4random_uniform(UInt32(Length)))
|
21
|
-
checkSet.insert(
|
21
|
+
checkSet.insert(integerArray [0])// 0番目もチェック対象に含める
|
22
22
|
for i in 1...Length-1 {
|
23
23
|
repeat{
|
24
24
|
integerArray[i] = Int(arc4random_uniform(UInt32(Length)))
|
1
0番目の登録忘れ
answer
CHANGED
@@ -18,6 +18,7 @@
|
|
18
18
|
var integerArray = Array(repeating: 0, count: Length)
|
19
19
|
|
20
20
|
integerArray[0] = Int(arc4random_uniform(UInt32(Length)))
|
21
|
+
checkSet.insert(insertArray[0])// 0番目もチェック対象に含める
|
21
22
|
for i in 1...Length-1 {
|
22
23
|
repeat{
|
23
24
|
integerArray[i] = Int(arc4random_uniform(UInt32(Length)))
|