Skip to content

Instantly share code, notes, and snippets.

View dalcon10028's full-sized avatar
๐ŸŸ

dalcon dalcon10028

๐ŸŸ
View GitHub Profile
@dalcon10028
dalcon10028 / list3.c
Last active May 27, 2020 00:56
[ ์ž๋ฃŒ๊ตฌ์กฐ ] ์—ฐ๊ฒฐ๋ฆฌ์ŠคํŠธ 3๋ฒˆ ๋ฌธ์ œ
/*
3. ์œ„ ์—ฐ๊ฒฐ๋ฆฌ์ŠคํŠธ์—์„œ ๊ฐ ๋…ธ๋“œ์˜ ๋ฐ์ดํ„ฐ ๊ฐ’์˜ ํ•ฉ์„ ์ถœ๋ ฅํ•˜์‹œ์˜ค.
head
-----> 1 -> 3 -> 5 -> 7 -> 9|NULL
*/
#include <stdio.h>
#include <stdlib.h>
@dalcon10028
dalcon10028 / list2.c
Last active May 27, 2020 00:57
[ ์ž๋ฃŒ๊ตฌ์กฐ ] ์—ฐ๊ฒฐ๋ฆฌ์ŠคํŠธ 2๋ฒˆ ๋ฌธ์ œ
/*
2. ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—ฐ๊ฒฐ๋ฆฌ์ŠคํŠธ๋ฅผ ์ƒ์„ฑํ•˜๊ณ  ์ „์ฒด ๋…ธ๋“œ์˜ ๋ฐ์ดํ„ฐ ๊ฐ’์„ ์ถœ๋ ฅํ•˜์‹œ์˜ค.
head
-----> 1 -> 3 -> 5 -> 7 -> 9|NULL
*/
#include <stdio.h>
#include <stdlib.h>
@dalcon10028
dalcon10028 / Kaprika ์ˆ˜.c
Last active May 22, 2020 11:54
Kaprika ์ˆ˜
/*
Kaprika ์ˆ˜
๋„ค ์ž๋ฆฌ ์ˆซ์ž 2025๊ฐ€ ์žˆ์„ ๋•Œ ๋‘ ์ž๋ฆฌ์”ฉ 20, 25๋กœ ๋‚˜๋ˆ ์„œ ํ•ฉํ•œ ๊ฐ’์ธ 45๋ฅผ ์ œ๊ณฑํ•˜์˜€์„ ๋•Œ ๊ฐ’์ด ์›๋ž˜ ์ˆ˜์ธ 2025์™€ ๋น„๊ตํ•˜๋Š” ๋ฌธ์ œ
2025๋ฅผ ์˜ˆ๋กœ ๋“ค๋ฉด...
1. 20, 25์œผ๋กœ ๋ถ„๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
-> 2025 / 100 = 20 , 2025 % 100 = 25
์ด๋•Œ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด์—์„œ์˜ /,%๋Š” ์ˆซ์ž๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ์šฉ๋„๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฑธ ์•Œ์•„๋ƒ…๋‹ˆ๋‹ค.
@dalcon10028
dalcon10028 / 7์ฃผ์ฐจ.java
Created April 20, 2020 05:46
์ •์ˆ˜ํ˜• ๋ฐฐ์—ด์˜ ์ž…๋ ฅ, ์‚ญ์ œ ํ”„๋กœ๊ทธ๋žจ
import java.util.*;
public class Main {
static LinkedList<Integer> list = new LinkedList<>(); // ์ •์ˆ˜๋ฅผ ๋„ฃ์„ ๋ฆฌ์ŠคํŠธ
public static void main(String[] args) {
int input;
do{
input = menu();
switch (input) {
case 1: showArray(); break;
#include <stdio.h>
int num[5000];
int flag=-1;
/* ํ•จ์ˆ˜๋ฅผ ๋ฏธ๋ฆฌ์ •์˜ ํ•จ์œผ๋กœ์จ ํ•จ์ˆ˜์˜ ์œ„์น˜๋ฅผ ์ž์œ ๋กœํžˆ ํ•  ์ˆ˜ ์žˆ๋‹ค */
int menu(void);
void all_numbers(void); void add_number(void); void delete_number(void); void bubbleSort(void);
void main(void){
int choice;
@dalcon10028
dalcon10028 / ํŒ๋งค๋Ÿ‰ ๊ฒ€์ƒ‰ ํ”„๋กœ๊ทธ๋žจ.c
Last active May 18, 2020 02:58
์ž๋ฃŒ๊ตฌ์กฐ์‹ค๋ฌด 6์ฃผ์ฐจ
/*********************************************************/
/* ํŒ๋งค๋Ÿ‰ ๊ฒ€์ƒ‰ํ”„๋กœ๊ทธ๋žจ 1.0 */
/* 2020๋…„ 4์›” 6 ์ผ */
/*********************************************************/
#include <stdio.h>
/* ์ฒซ๋ฒˆ์งธ ์š”์†Œ : 4 ์ง€์ (์„œ์šธ, ๋ถ€์‚ฐ, ์ธ์ฒœ, ๊ด‘์ฃผ)
๋‘๋ฒˆ์งธ ์š”์†Œ : 3 ํ’ˆ๋ชฉ(์ปดํ“จํ„ฐ, ํ”„๋ฆฐํ„ฐ, ์Šค์บ๋„ˆ)
์„ธ๋ฒˆ์งธ ์š”์†Œ : 4 ๋ถ„๊ธฐ(1/4๋ถ„๊ธฐ, 2/4๋ถ„๊ธฐ, 3/4๋ถ„๊ธฐ, 4/4๋ถ„๊ธฐ */
int sale[4][3][4] = {
{ { 10, 20, 15, 30 }, {5, 8, 40, 50}, { 26, 12, 18, 27 } },
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long[][] num = new long[n+2][10];
for (int i=1; i<=9; i++) {
num[1][i] = 1;
if (i==9) num[2][i] = 1;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] num = new int[n+1];
for (int i=2; i<=n; i++) {
num[i] = num[i-1]+1;
if (i%2==0 && num[i/2]+1 < num[i])
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int n = sc.nextInt();
for(int i=0; i<n; i++){
if (n==1) {
sb.append("*");
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] stair = new int[n+1];
int[] dp = new int[n+1];
for(int i=1; i<=n; i++)
stair[i] = sc.nextInt();