This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def graph(x, y): | |
| # 그래프 생성 | |
| fig, ax = plt.subplots() | |
| # x축과 y축 그리기 | |
| ax.spines['left'].set_position('center') | |
| ax.spines['bottom'].set_position('center') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| n = int(input()) | |
| parent=list(map(int, input().split(' '))) | |
| #parent의 element 중 deleted_node가 있으면 제거 | |
| def removeNode(deleted_node, parent): | |
| parent[deleted_node]=None #노드 제거 | |
| for i in range(len(parent)): | |
| if parent[i]==deleted_node: | |
| removeNode(i, parent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import heapq | |
| def solution(scoville, K): | |
| answer = 0 | |
| heapq.heapify(scoville) | |
| if scoville[0]>=K: | |
| return answer | |
| while True: | |
| heapq.heappush(scoville, heapq.heappop(scoville)+(heapq.heappop(scoville)*2)) | |
| answer+=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionListener; | |
| import java.awt.event.ActionEvent; | |
| import java.util.HashMap; | |
| import java.util.Scanner; | |
| public class elevator { | |
| int minFloor; | |
| int maxFloor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class project{ | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| for(int i=2 ; i<=99 ; i++) { | |
| System.out.println("*** "+i+"단 ***"); | |
| for(int j=1 ; j<=99 ; j++) { | |
| System.out.println(i+" × "+j+" = "+(i*j)); | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class project { | |
| public static void main(String[] args) throws Exception { | |
| // TODO Auto-generated method stub | |
| Scanner scanner = new Scanner(System.in); | |
| String inputData; | |
| while(true) { | |
| inputData=scanner.nextLine(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package project1; | |
| public class project { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| //float var1_1=1.3; //Compile Error! | |
| float var1_2=2.5f; | |
| float var1_3=3.9F; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| install.packages('readxl') | |
| install.packages('dplyr') | |
| install.packages('treemap') | |
| library(readxl) | |
| library(treemap) | |
| library(dplyr) | |
| setwd('C:/University_Project/R/finalTest') | |
| baker <- read_excel('기말고사_공공데이터_1차가공.xlsx') | |
| head(baker) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def func(x): | |
| print(x) | |
| pass | |
| func(5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ss = "IT_CookBook" | |
| '#'.join(ss) |
NewerOlder