728x90
https://school.programmers.co.kr/learn/courses/30/lessons/120883
📝 나의 풀이
using System;
public class Solution {
public string solution(string[] id_pw, string[,] db) {
string answer = "fail";
for(int i=0; i<db.GetLength(0); i++){
if(id_pw[0]==db[i,0]){
if(id_pw[1] == db[i,1]) answer = "login";
else answer = "wrong pw";
}
}
return answer;
}
}
728x90
'코딩테스트 > [C#] 프로그래머스' 카테고리의 다른 글
[프로그래머스 | C# | Lv.0] 1로 만들기 (0) | 2023.09.19 |
---|---|
[프로그래머스 | C# | Lv.0] ad 제거하기 (0) | 2023.09.19 |
[프로그래머스 | C# | Lv.0] 문자열 정렬하기 (1) (0) | 2023.09.18 |
[프로그래머스 | C# | Lv.0] 최댓값 만들기 (2) (0) | 2023.09.18 |
[프로그래머스 | C# | Lv.0] 영어가 싫어요 (0) | 2023.09.17 |