Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- 책추천
- 넥사크로
- Javascript
- MariaDB
- IntelliJ
- 책
- 리눅스
- git
- 명령어
- DBMS
- springboot
- docker
- 독서
- 후기
- java
- Linux
- 오블완
- PostgreSQL
- mssql
- 네트워크
- SQL
- mysql
- github
- 티스토리챌린지
- spring
- Python
- pandas
- 인터페이스
- JAVA8
- oracle
Archives
- Today
- Total
목록Study/ALGORITHM (42)
hanker
백준(2577) JAVA - 숫자의 개수
import java.util.Scanner; public class Main { public static void main(String args[]) throws Exception{ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int x = A * B * C; int[] ar = new int[10]; while(x > 0) { ar[x % 10] += 1; x /= 10; } for(int i = 0 ; i < 10 ; i++) { System.out.println(ar[i]); } } }
Study/ALGORITHM
2020. 12. 18. 09:48
백준(2562) JAVA - 최댓값
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = 9; int[] ar = new int[9]; int tmp = 0; int maxInt = 0; for(int i = 0 ; i < 9 ; i++) { ar[i] = sc.nextInt(); if(tmp < ar[i]) { tmp = ar[i]; maxInt = i+1; } } System.out.println(tmp); System.out.println(maxInt); } }
Study/ALGORITHM
2020. 12. 18. 09:36