Skip to content

Commit

Permalink
#57 - 모의고사 문제 풀이
Browse files Browse the repository at this point in the history
  • Loading branch information
hwangJi-dev committed Jan 5, 2023
1 parent 7d4c54f commit d6e2e16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Programmers/Programmers/level1/모의고사.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import Foundation

func solution(answers:[Int]) -> [Int] {
let supoza1 = Array(String(repeating: "12345", count: answers.count % 5 != 0 ? (answers.count / 5) + 1 : (answers.count / 5))).map({ String($0) })
let supoza2 = Array(String(repeating: "21232425", count: answers.count % 8 != 0 ? (answers.count / 8) + 1 : (answers.count / 8))).map({ String($0) })
let supoza3 = Array(String(repeating: "3311224455", count: answers.count % 10 != 0 ? (answers.count / 10) + 1 : (answers.count / 10))).map({ String($0) })
let supoza1 = Array(String(repeating: "12345", count: (answers.count / 5) + 1)).map({ String($0) })
let supoza2 = Array(String(repeating: "21232425", count: (answers.count / 8) + 1)).map({ String($0) })
let supoza3 = Array(String(repeating: "3311224455", count: (answers.count / 10) + 1)).map({ String($0) })
var dict: [Int: Int] = [1: 0, 2: 0, 3: 0]

for (index, answer) in answers.enumerated() {
Expand Down

0 comments on commit d6e2e16

Please sign in to comment.