728x90
public class Solution
{
public int solution(string s)
{
int answer = int.Parse(s);
return answer;
}
}
s가 문자열입니다.
문자열을 정수로 바꿔주는 int.Parse로 s를 선택하면 됩니다.
728x90
'C# > 프로그래머스' 카테고리의 다른 글
c# 프로그래머스 짝수와 홀수 (0) | 2020.11.08 |
---|---|
C# 프로그래머스 평균 구하기 (0) | 2020.11.05 |
C# 프로그래머스 별 그리기 (0) | 2020.11.05 |