개발 블로그를 벨로그로 이전했습니다!
새로운 글은 아래 링크에서 확인해주세요 :)
https://velog.io/@nawaraing/posts
nawaraing (그냥 준현) / 작성글 - velog
velog.io
개발 블로그를 벨로그로 이전했습니다!
새로운 글은 아래 링크에서 확인해주세요 :)
https://velog.io/@nawaraing/posts
nawaraing (그냥 준현) / 작성글 - velog
velog.io
숫자로 변환할 수 없는 문자열이 입력값으로 들어왔을 때 발생
입력값을 문자로 비교해서 해결
입력값이 숫자로서 값을 비교하거나 연산하는 것이 아니었기에 사용할 수 있었던 방법
import random
import time
def error_page(mini, maxi):
print(str(mini) + "~" + str(maxi) + "사이에 숫자만 입력 가능합니다!")
def exit_page():
print("게임을 종료합니다.", end="")
for i in range(2):
time.sleep(0.5)
print(".", end="")
exit()
def start():
while True:
minimum = 1
maximum = 100
print("=== UP & DOWN Game ===")
print("1. 시작하기")
print("0. 종료하기")
action = input()
if (action == "0"):
exit_page()
elif (action == "1"):
rand_num = random.randint(1, 100)
# print("rand_num: " + str(rand_num))
while True:
print("숫자를 입력해주세요(" + str(minimum) + "~" + str(maximum) + ") >>")
num = input()
if not num.isnumeric() or int(num) < minimum or int(num) > maximum:
error_page(minimum, maximum)
continue
if (int(num) == rand_num):
while True:
print("정답입니다!")
print("1. 다시하기")
print("0. 종료하기")
action = input()
if (action == "0"):
exit_page()
elif (action == "1"):
minimum = 1
maximum = 100
rand_num = random.randint(1, 100)
break
else:
error_page(0, 1)
elif int(num) < rand_num:
minimum = int(num)
print("UP!")
elif int(num) > rand_num:
maximum = int(num)
print("DOWN!")
else:
error_page(0, 1)
# Game Start
start()
@PathVariable (0) | 2024.03.11 |
---|---|
Spring boot (0) | 2024.03.07 |
day067 (0) | 2024.03.07 |
QnA (0) | 2024.03.06 |
[Spring] 자체 프레임워크로 이관 (0) | 2024.03.05 |
💡 이 글은 코리아IT아카데미 알고리즘 스터디 그룹과 공유하기 위해 작성되었습니다
푼 문제의 ‘제출’ 메뉴에 아래 두가지를 지켜서 제출
위를 지키지 않을 경우 아래의 에러 발생
solved.ac를 백준에 연동하면 문제&개인 티어를 볼 수 있습니다
*제가 생각하는 중요도 순으로 작성했습니다.
*다른 의견 있으시면 적극 반영하겠습니다.
아래 코드는 모두 1초가 걸림
[백준 17287] The Deeper, The Better (0) | 2024.05.01 |
---|---|
[2024 KAKAO WINTER INTERNSHIP] 도넛과 막대 그래프 (0) | 2024.04.14 |
[Codeforces Round 939] B. Nene and the Card Game (0) | 2024.04.14 |
[2024 KAKAO WINTER INTERNSHIP] 가장 많이 받은 선물 (0) | 2024.04.14 |
[Codeforces Round 939] A. Nene's Game (0) | 2024.04.14 |
https://www.acmicpc.net/problem/17287
import java.util.Scanner;
import java.util.Stack;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n = sc.nextLine();
Stack<Boolean> point = new Stack<Boolean>();
int maxi = 0;
for (int i = 0; i < n.length(); i++) {
if (n.charAt(i) == '[') {
point.add(true);
point.add(true);
point.add(true);
} else if (n.charAt(i) == '{') {
point.add(true);
point.add(true);
} else if (n.charAt(i) == '(') {
point.add(true);
} else if (n.charAt(i) == ']') {
point.pop();
point.pop();
point.pop();
} else if (n.charAt(i) == '}') {
point.pop();
point.pop();
} else if (n.charAt(i) == ')') {
point.pop();
} else if ('0' <= n.charAt(i) && n.charAt(i) <= '9') {
if (maxi < point.size())
maxi = point.size();
}
}
System.out.println(maxi);
}
}
👨💻알고리즘 문제 풀이 가이드라인👩💻 (0) | 2024.05.01 |
---|---|
[2024 KAKAO WINTER INTERNSHIP] 도넛과 막대 그래프 (0) | 2024.04.14 |
[Codeforces Round 939] B. Nene and the Card Game (0) | 2024.04.14 |
[2024 KAKAO WINTER INTERNSHIP] 가장 많이 받은 선물 (0) | 2024.04.14 |
[Codeforces Round 939] A. Nene's Game (0) | 2024.04.14 |
팀프로젝트에서 무슨 역할을 맡았는지?
왜 그 역할을 맡았는지?
AWS 무료인데 왜 사용해보지 않았는지?
DP에 대해 알고 있는지?
다른 알고리즘과 차별점은 무엇인지?
종이 한 장 가지고 이커머스를 설계
테이블 설계 그리는 동안 왜 그렇게 하는지 중간중간 질문함
회원, 상품, 구매내역, 장바구니 4개 가지고 테이블 구체화 시작
구매내역과 주문내역 구분 해야 되지 않냐는 질문
멤버 아이디가 PK이면 자료형 뭐 쓸지 질문
비밀번호 암호화 안 했는지 질문
sha 알고 있는지 질문
복호화가 안 되는 기술인데 그러면 나중에 회원 비밀번호를 어떻게 비교할지 질문함
백준에서 간단한 for문 문제 손 코딩
문제지에 프로덕션 코드라고 생각하고 작성하라고 쓰여있음
주요 조건이 빠져있는데 의도를 파악하는 것도 테스트
성장이 뭐라고 생각하는지?
다른 후보자와 비교했을 때 본인의 장점
다른 후보자와 비교했을 때 본인의 단점
(직무적인 게 됐든 생활적인 게 됐든)
[면접 후기] ERP 만드는 캘리포니아 스타트업 회사 (0) | 2024.02.09 |
---|
스프링이란?
엔터프라이즈용 Java 애플리케이션 개발을 도와주는 오픈소스 경량급 애플리케이션 프레임워크
2. IoC/DI
3. AOP
4. PSA (Portable Service Abstraction)
스프링부트란?
스프링의 문제점을 해결해주기 위해 개발된 프레임워크
스프링 애플리케이션 개발을 빠르게 시작할 수 있도록 도와주는 프로젝트에서 시작
[면접 준비] 디자인 패턴 & MVC 패턴이란? (0) | 2024.04.25 |
---|---|
[면접 준비] OOP란? (0) | 2024.04.25 |
디자인 패턴이란?
프로그래밍 중에 빈번하게 발생하는 문제의 해결방법을 정리해둔 규약
MVC 패턴이란?
디자인 패턴 중 하나
프로젝트를 구성할 때 구성요소를 모델, 뷰, 컨트롤러 3가지 역할로 구분
모델
데이터와 데이터를 가공하는 컴포넌트
뷰
사용자에게 보여지는 인터페이스
데이터와 객체의 입력과 출력을 담당
컨트롤러
모델과 뷰를 잇는 다리 역할
사용자 이벤트를 처리
MVC패턴을 쓰는 이유
각자의 역할에 집중하여 개발하면 유지보수성과 확장성, 유연성이 증가
[면접 준비] 스프링 & 스프링부트란? (0) | 2024.04.26 |
---|---|
[면접 준비] OOP란? (0) | 2024.04.25 |
객체 - 실재하는 모든 것
추상화, 상속, 다형성, 캡슐화가 특징
[면접 준비] 스프링 & 스프링부트란? (0) | 2024.04.26 |
---|---|
[면접 준비] 디자인 패턴 & MVC 패턴이란? (0) | 2024.04.25 |
build.gradle 파일은 Gradle 빌드 도구를 사용하는 프로젝트에서 프로젝트의 빌드 구성 및 관리를 위한 스크립트입니다
이 파일은 Grooby 또는 Kotlin DSL(Domain Specific Language)을 사용하여 작성되며, 프로젝트의 의존성 관리, 빌드 구성, 테스트 설정 등을 포함합니다
일반적으로 build.gradle 파일은 다음과 같은 구조를 가집니다
plugins {
id 'java'
}
repositories {
jcenter()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks {
// 빌드 태스크 설정
}
위의 예제에서 `plugins`, `repositories`, `dependencies`, `tasks`는 각각 Gradle 빌드 스크립트에서 사용되는 섹션입니다
[JAVA] POJO(Plain Old Java Object)란? (3) | 2024.03.12 |
---|---|
[JAVA] 접근제어자 이해하기 (0) | 2023.12.18 |
[JAVA] Java Doc 주석 (0) | 2023.12.15 |
[JAVA] 인터페이스와 추상 클래스의 차이 (0) | 2023.12.09 |
[JAVA] 추상 클래스와 추상 메서드의 이해와 활용 (1) | 2023.12.08 |
JSP(JavaServer Pages)는 서버 측에서 동적으로 웹 페이지를 생성하는 기술로, HTML 안에 Java 코드를 포함하여 웹 페이지를 작성할 수 있습니다. JSP는 Java 언어를 기반으로 하여, 서블릿 컨테이너에서 실행됩니다
최근 몇 년간 프론트엔드 기술의 발전으로 인해 클라이언트 측에서도 동적으로 콘텐츠를 생성하고 제어할 수 있는 기술들이 많이 등장했습니다
이로 인해 JSP보다는 SPA(Single Page Application)와 같은 프론트엔드 프레임워크 및 라이브러리 사용이 더 많아지고 있습니다
[웹 개발] DOM(Document Object Model)이란? (0) | 2024.04.05 |
---|---|
[프론트엔드] jQuery란? (0) | 2024.04.04 |
[프론트엔드] JSTL(JSP Standard Tag Library) 간단 예제 (0) | 2024.03.29 |
[프론트엔드] JSP 태그 (0) | 2024.03.28 |
[프론트엔드] EL(Expression Language) 표현 언어 기본 문법 (0) | 2024.03.20 |
깃헙 블로그를 만들기 위해 테마를 찾아봤다
내 기준 예쁜 테마 목록을 추려봤다
http://jekyllthemes.org/themes/slides/
Webjeda Slides
Webjeda slides is built using revealjs. The idea is to keep all the slideshows in one place as posts. All your presentations can be accessed from one place!
jekyllthemes.org
http://jekyllthemes.org/themes/agency/
Agency
This is the Agency Bootstrap theme converted to a gem-based Jekyll theme with GitHub Pages support. While this had been done before, (here, here, and here), these are outdated and have not been updated or maintained for years. I built this theme from the m
jekyllthemes.org
https://inded.xyz/Jekyll_modern-blog/
Modern Blog
Planes are cool! The Fly! Dolor sit amet? Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vestibulum non mi non pulvinar. Donec tempus risus vel ex fringilla tempor. Vivamus pharetra non mauris quis fermentum. Vestibulum sed maximus elit, si
inded.xyz
http://obaez.com/dentistsmile/
DentistSmile | Dental Jekyll Theme
DentistSmile A responsive Jekyll theme for dental clinics.
obaez.com
http://jekyllthemes.org/themes/spectral/
Spectral
HTML5 UP makes spiffy HTML5 site templates that are: - Fully Responsive - Built on intelligent HTML5 + CSS3 - Super Customizable - 100% Free under the Creative Commons, which means you can use them for personal stuff, use them for commercial stuff, change
jekyllthemes.org
http://jekyllthemes.org/themes/Jalpc-jekyll-theme/
Jalpc
This is a simple, beautiful and swift theme for Jekyll. It’s mobile first, fluidly responsive, and delightfully lightweight.It’s pretty minimal, but leverages large type and drastic contrast to make a statement, on all devices.The landing page of the b
jekyllthemes.org
https://fullit.github.io/#2section
FullIt
Fullit make your landing page a fullpage sliding tool usefull for web marketing and advertising
fullit.github.io
https://yizeng.github.io/jekyll-theme-simple-texture/
Simple Texture
A gem-based responsive simple texture styled Jekyll theme.
yizeng.github.io
http://jekyllthemes.org/themes/neumorphism/
Neumorphism
Neumorphism Neumorphism Neumorphism designed Jekyll theme for personal websites, portfolios and resumes. This is a personal website built with Jekyll, which is based on the new Neumorphism design trend and was developed with a mobile-first approach. It is
jekyllthemes.org
http://jekyllthemes.org/themes/neumorphism/
Neumorphism
Neumorphism Neumorphism Neumorphism designed Jekyll theme for personal websites, portfolios and resumes. This is a personal website built with Jekyll, which is based on the new Neumorphism design trend and was developed with a mobile-first approach. It is
jekyllthemes.org
http://jekyllthemes.org/themes/ubuild/
uBuild
Welcome to uBuild [beta] uBuild is an open-source Jekyll based theme and comes with 16 fully responsive design block. It also doubles as a builder tool when used inside the Forestry content manager. Learn More Take a look at our live demo to get a feel for
jekyllthemes.org
http://jekyllthemes.org/themes/event-jekyll-theme/
Event
Event Jekyll Theme Please refer to this repository for instructions on how to use it.
jekyllthemes.org
https://github.com/congchu/web-porfolio?tab=readme-ov-file
GitHub - congchu/web-porfolio: 개발자를 위한 쉽고 빠른 웹 포트폴리오 만들기
개발자를 위한 쉽고 빠른 웹 포트폴리오 만들기 . Contribute to congchu/web-porfolio development by creating an account on GitHub.
github.com
[MacOS] Brew(Homebrew)란? (0) | 2024.04.14 |
---|---|
[Ruby] rbenv란? (0) | 2024.04.13 |
오픈 소스 첫 풀리퀘 기념 (0) | 2024.02.15 |
https://school.programmers.co.kr/learn/courses/30/lessons/258711
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
class Solution {
public int[] solution(int[][] edges) {
// 배열 생성
int[] shootCnt = new int[1000000 + 1];
int[] receiveCnt = new int[1000000 + 1];
for (int i = 0; i < edges.length; i++) {
shootCnt[edges[i][0]]++;
receiveCnt[edges[i][1]]++;
}
// 사용하지 않는 점 제거
for (int i = 1; i <= 1000000; i++) {
if (shootCnt[i] == 0 && receiveCnt[i] == 0) {
shootCnt[i] = -1;
receiveCnt[i] = -1;
}
}
// 정점 찾기
int totalGraphsNum = 0;
int point = 0;
for (int i = 1; i <= 1000000; i++) {
// Idea1 : 들어오는 선 없이 나오는 선이 2개 이상인 점이 정점이다.
if (shootCnt[i] >= 2 && receiveCnt[i] == 0) {
point = i;
// Idea2 : 정점에서 나오는 선의 갯수가 전체 그래프의 수이다.
totalGraphsNum = shootCnt[point];
}
}
// 정점 제거
shootCnt[point] = -1;
receiveCnt[point] = -1;
// 정점과 연결된 선 제거
for (int i = 0; i < edges.length; i++) {
if (edges[i][0] == point || edges[i][1] == point) {
shootCnt[edges[i][0]]--;
receiveCnt[edges[i][1]]--;
edges[i][0] = 0;
edges[i][1] = 0;
}
}
int stickGraphsNum = 0;
int eightGraphsNum = 0;
for (int i = 1; i <= 1000000; i++) {
// Idea3 : 정점과 정점에 연결된 선을 지우고 나서, 연결된 선이 없거나 들어오는 선이 하나고 나오는 선이 없는 정점의 갯수가 막대 모양 그래프의 갯수이다.
if ((shootCnt[i] == 0 && receiveCnt[i] == 0) ||
(shootCnt[i] == 0 && receiveCnt[i] == 1)) {
stickGraphsNum++;
}
// Idea4 : 정점과 정점에 연결된 선을 지우고 나서, 나오는 선이 2개인 정점의 갯수가 8자 모양 그래프의 갯수이다.
if (shootCnt[i] == 2) {
eightGraphsNum++;
}
}
// Idea5 : 전체 그래프의 수에서 막대 모양 그래프의 갯수와 8자 모양 그래프의 갯수를 빼면 도넛 모양 그래프의 갯수이다.
int doughnutGraphsNum = totalGraphsNum - stickGraphsNum - eightGraphsNum;
int[] answer = {point, doughnutGraphsNum, stickGraphsNum, eightGraphsNum};
return answer;
}
}
👨💻알고리즘 문제 풀이 가이드라인👩💻 (0) | 2024.05.01 |
---|---|
[백준 17287] The Deeper, The Better (0) | 2024.05.01 |
[Codeforces Round 939] B. Nene and the Card Game (0) | 2024.04.14 |
[2024 KAKAO WINTER INTERNSHIP] 가장 많이 받은 선물 (0) | 2024.04.14 |
[Codeforces Round 939] A. Nene's Game (0) | 2024.04.14 |