Skip to content

[Algorithm] 문자열을 정수로 바꾸기 #60

Description

@hwangJi-dev

💬 문제

[코딩테스트 연습 - 문자열을 정수로 바꾸기](https://school.programmers.co.kr/learn/courses/30/lessons/12925)


💬 Idea

  • String을 Int로 형변환하자.

💬 풀이

func solution(_ s:String)->Int{returnInt(s)!
}

💬 알게된 것

  • String이 Int로 형변환될 때 부호값이 들어있어도 Int로 변환된다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions