본문 바로가기

분류 전체보기142

Unity time.time과 time.deltaTime의 설명 및 차이점 docs.unity3d.com/ScriptReference/Time-time.html Unity - Scripting API: Time.time Time.time is the amount of time in seconds that the application has been running for. It is read-only. The application receives the current Time.time at the beginning of each frame, with the value increasing per frame. A time call per frame receives the sa docs.unity3d.com 2020.3버전 Time.time API입니다. docs.unity3d.com.. 2021. 3. 25.
Unity Object.Instantiate() 설명 docs.unity3d.com/ScriptReference/Object.Instantiate.html Unity - Scripting API: Object.Instantiate This function makes a copy of an object in a similar way to the Duplicate command in the editor. If you are cloning a GameObject you can specify its position and rotation (these default to the original GameObject's position and rotation otherwise). If you docs.unity3d.com 위에 나와있는 것이 Unity Scription.. 2021. 3. 21.
백준 2869번 C/C++ www.acmicpc.net/problem/2869 2869번: 달팽이는 올라가고 싶다 첫째 줄에 세 정수 A, B, V가 공백으로 구분되어서 주어진다. (1 ≤ B < A ≤ V ≤ 1,000,000,000) www.acmicpc.net 이 문제는 생각보다 쉽다고 생각하고 문제에 접근을 하였습니다. while문 하나로 문제에 있는 모든 예시가 완벽하게 한번에 돌아가서 답이 맞겠구나 싶어서 바로 제출을 했는데 이럴수가.. 시간초과..??? 아니 while문 하나만 썼는데 시간초과? 반복문 자체를 쓰면 안되는 문제구나라고 생각하고 다시 생각을 했습니다. 그러면서 생각한 방식이 결국 마지막 날에는 a만큼 올라가게 될거고 그 전날에는 a-b만큼 올라가게 될 것이니까 (v-a) / (a-b)를 해보면 어떨까 싶.. 2021. 3. 1.
백준 2839번 C/C++ www.acmicpc.net/problem/2839 2839번: 설탕 배달 상근이는 요즘 설탕공장에서 설탕을 배달하고 있다. 상근이는 지금 사탕가게에 설탕을 정확하게 N킬로그램을 배달해야 한다. 설탕공장에서 만드는 설탕은 봉지에 담겨져 있다. 봉지는 3킬로그 www.acmicpc.net 이 문제를 처음 접했을 때 생각한 방법은 n의 값을 받아온 다음 5를 최대한 빼고 그 다음에 3을 빼는 방식을 선택했습니다. 하지만 이렇게 되니 문제점이 나왔습니다. 11의 경우에 5, 3, 3으로 가능하지만 5, 5, X가 되어서 -1이 나오는 것이었습니다. 그래서 다른 방식을 선택을 하였는데 fiveCount라는 5를 얼마나 뺄 수 있는지를 늘려가면서 하는 것이었습니다. 이 방식도 귀찮은게 break식을 정하는 것이 .. 2021. 3. 1.