전체 글151 백준#2444 2023-07-24 힘들게했는데,,, 입력 뒷줄에 공백이 들어가면 안됬었네요,,,, 이런.. StringBuilder stringBuilder = new StringBuilder(); int put = int.Parse(Console.ReadLine()); for(int i = 1; i = 1; i--) { if(i-1 = 1; i--) { if(i-1 2023. 7. 24. 2023-07-24 유니티 #2 문득 책에서 봤던 string? strTest; 이런식으로 null체크 했던 부분 생각나서 테스트 했슴당.. 델리게이트 활용한 null 체크 테스트,, public class InvokeTest : MonoBehaviour { // 델리게이트 선언 public delegate void MyDelegate(int test,string textTest); //매개변수를 int와 string으로 줌. public MyDelegate myDelegate = null; private int testIntValue = 10; private string testStrValue = "hello"; void Start() { myDelegate?.Invoke(testIntValue, testStrValue); //이건 .. 2023. 7. 24. 백준 C#11718 2023-07-21 using System.Text; //스트링빌더때 필요함 StringBuilder stringBuilder = new StringBuilder(); //스트링 빌더 string put = string.Empty; //초기화 while(true){ put = Console.ReadLine(); if(string.IsNullOrEmpty(put)) break; //vscode에서는 아무리봐도 이상한 결과인데 백준에선 정답이여서 그냥 때려쳤음.. stringBuilder.AppendLine(put); //list에서 Add 역할 } Console.WriteLine(stringBuilder); 첫 번째 트라이때 했던 것 string? put = string.Empty; //입력 받을 곳 StringBuilder.. 2023. 7. 21. 백준 C#5622 2023-07-20 원래 안 올릴려고 했는데 성공해서 올립니당.. string? put = Console.ReadLine(); //입력 받기 if(put == null) return; //null일 경우 리턴 int time = 0; //시간의 합계 int play = 0; //몇 회 플레이 되었는가 for(int i = 0; i 2023. 7. 20. 이전 1 ··· 17 18 19 20 21 22 23 ··· 38 다음