분류 전체보기

using System; public class Solution { public int solution(string my_string, string is_suffix) { int answer = 0; answer = my_string.EndsWith(is_suffix) ? 1 : 0; return answer; } }
using System; using System.Collections.Generic; public class Solution { public int[] solution(int[] num_list, int n) { int[] answer = new int[] {}; List array = new List(); for(int i = n - 1; i < num_list.Length; i++) array.Add(num_list[i]); answer = array.ToArray(); return answer; } }
using System; using System.Collections.Generic; public class Solution { public int[] solution(int[] num_list, int n) { List answer = new List(); for(int i = 0; i < num_list.Length; i += n) { answer.Add(num_list[i]); } return answer.ToArray(); } }
using System; using System.Collections.Generic; public class Solution { public int[] solution(int n, int[] numlist) { int[] answer = new int[] {}; List array = new List(); for(int i = 0; i < numlist.Length; i++) { if(numlist[i] % n == 0) array.Add(numlist[i]); } answer = array.ToArray(); return answer; } }
using System; public class Solution { public int solution(int n) { int answer = 0; answer = Math.Sqrt(n) % 1 == 0 ? 1 : 2; return answer; } }
💻 using System; public class Solution { public int solution(int order) { int answer = 0; while(order > 0) { if((order % 10) % 3 == 0 && order % 10 != 0) { answer++; } order /= 10; } return answer; } }
💻 class Solution { public long solution(long n) { long answer = 0; for(long i=1; i=n) { break; } } if(answer ==0) { answer =-1; } return answer; } }
using System; public class Solution { public bool solution(int x) { bool answer = true; string result = x.ToString(); int sum = 0; for (int i = 0; i < result.Length; i++) { sum += (int)Char.GetNumericValue(result[i]); } answer = x % sum == 0 ? true : false; return answer; } }
using System; public class Solution { public int solution(int[] numbers) { int answer = 0; for (int i = 1; i
💻 using System; public class Solution { public int solution(int[] num_list) { int answer = 0; int result1 = 0; int result2 = 0; for(int i = 0; i result2 ? result1 : result2; return answer; } }
suniverse
'분류 전체보기' 카테고리의 글 목록 (5 Page)