라스트오리진 (2) 썸네일형 리스트형 코틀린 1일차 fun main(args: Array) println("hello, world") } fun max(a:Int, b:Int): Int { return if (a>b) a else b } println(max(1,2)) == fun max(a:Int, b:Int) = if(a>b) a else b enum class Color(var r: Int, var g:Int, var b:Int) { BLUE(0, 0, 255); fun rgb()=(r*256+g)*256 + b } println(Color.BLUE.rgb()) fun getMNemonic(color:Color) = wehn(color) { Color.BLUE, Color.Red -> "Batlle" } println(getMNemonic(Color.. 18115)카드 스택 #include #include #include #define MAX 1000000 int moto[MAX]; struct node { int card; struct node * next; struct node * prev; }; int main(void) { int num; scanf_s("%d", &num); int imsi; for (int i = 0; i card = 1; head->next = NULL; head->prev = NULL; struct node * tail = head; for (int i = 2; i card = i; switch (moto[num-i]) { case 1: head->next = noder; noder->next = NULL; noder->prev = head; .. 이전 1 다음