Traveling Programmer

  • 홈

java 353

[백준] 2828번. 사과 담기 게임 (JAVA)

https://www.acmicpc.net/problem/2828문제풀이import java.util.*;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int t = sc.nextInt(); int move = 0; int left = 0; int right = 0 + (m - 1); for(int i = 0; i right) { move += tmp - right; right = tmp; left = tmp - (m - ..

문제 풀이/백준 2024.01.15

[백준] 14916번. 거스름돈 (JAVA)

https://www.acmicpc.net/problem/14916 문제 풀이 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int count = 0; while(true){ if(N%5 == 0){ count += N/5; System.out.println(count); break; }else{ N -= 2; count++; } if(N < 0){ System.out.println(-1); break; } } } } 기본적인 아이디어는 5의 나머지를 제대로 활용하는 것이다. 처음엔 홀수와 짝..

문제 풀이/백준 2024.01.15

[백준] 1343번. 폴리오미노 (JAVA)

https://www.acmicpc.net/problem/1343 문제 풀이 import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String s = sc.next(); sc.close(); String res = poliomino(s); System.out.println(res); } private static String poliomino(String s) { String ans = ""; String A = "AAAA", B = "BB"; s = s.replaceAll("XXXX", A); ans = s.replaceAll("XX", B); i..

문제 풀이/백준 2024.01.15
이전
1 ··· 33 34 35 36
다음
더보기
프로필사진

Traveling Programmer

기록해가며 하는 공부

  • 분류 전체보기 (441) N
    • 강의 후기 (4)
      • 인프런 (3)
      • 기타 (1)
    • 문제 풀이 (394)
      • 백준 (309)
      • 프로그래머스 (47)
      • 소프티어 (22)
      • 도구정리 (16)
    • 설정 (1)
      • IntelliJ (1)
    • 지식 정리 (26)
      • AWS (14)
      • 운영체제 (0)
      • git (3)
      • JAVA (6)
      • 테코톡 (2)
      • 아키텍처 (1)
    • Spring (5)
      • Spring (1)
      • JPA (2)
      • Querydsl (2)
    • 지원 기록 (2)
    • DB (8) N
      • MySQL (7) N
      • Redis (1)

Tag

백준, DFS, 코틀린, AWS, 이분탐색, 티스토리챌린지, 도구정리, 오블완, Kotlin, CS정리, 프로그래머스, 소프티어, 자바, java, 에라토스테네스의 체, sql, dp, mysql, 알고리즘, BFS,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/11   »
일 월 화 수 목 금 토
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바