전체 글151 백준 #3009 2023-09-01 class Program { static void Main() { int[] x = new int[3]; int[] y = new int[3]; for(int i = 0; i 2023. 9. 1. 백준 #1978 2023-08-23 //개수 입력 int put = int.Parse(Console.ReadLine()); string[] data = Console.ReadLine().Split(); //카운트 기록 int report = 0; for(int i = 0; i 2023. 8. 24. 백준 #65475952 2023-08-22 string[] put = Console.ReadLine().Split(); int data = int.Parse(put[0]); int num = int.Parse(put[1]); int index = 1; int output = 0; for(int i = data; i >= 1; i--) { if(data % i == 0) { if(index == num) { output = data / i; break; } index++; } } Console.WriteLine(output); 그냥 이거로 만족하기로 하였습니다,, 건드리니깐 90ms떠서 포기하였습니다,, 2023. 8. 23. c# 네임드 튜플(짧게) public static (int hello,int test22) GetAttackPos() { return (0, 0); } 라는 메소드가 있다고할때, //네임드 튜플 var namedTuple = (hello: 1, test22: 2); Debug.Log($"{namedTuple.hello} / {namedTuple.test22}"); namedTuple = GetAttackPos(); Debug.Log($"{namedTuple.hello} / {namedTuple.test22}"); 이런식으로 활용가능한듯허다,, 귀찮어서 값 출력까진 안했는데, 아마도 얼추되는듯,, 참고한 글 https://honsal.blogspot.com/2018/07/clinqtuple-linq-named-tuple.html 2023. 8. 22. 이전 1 ··· 14 15 16 17 18 19 20 ··· 38 다음