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
- 타입스크립트
- CPU 스케줄링
- 협업
- 스프링
- 백준
- 코드업
- Redux
- 공부
- 알고리즘
- 자료구조
- Spring
- 파이썬
- error
- react
- OS
- web
- 일상
- js to ts
- codeup
- react-redux
- 리덕스장바구니
- 분할메모리할당
- memory
- Operating System
- 기초100제
- C++
- Java
- 정렬
- 프로그래머스
- 토이프로젝트
Archives
- Today
- Total
감자튀김 공장🍟
[CodeUp]JAVA 1072~1081 본문
반응형
[1072]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
for(int i = 0; i < a; i++) {
int b = scanner.nextInt();
System.out.println(b);
}
}
}
[1073]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(true) {
int a = scanner.nextInt();
if(a == 0)
break;
System.out.println(a);
}
}
}
[1074]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
while(true) {
if(a == 0)
break;
System.out.println(a--);
}
}
}
[1075]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
while(true) {
if(a == 0)
break;
System.out.println(--a);
}
}
}
[1076]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
char a = scanner.next().charAt(0);
char b = 'a';
for(char i = b; i <= a ; i++) {
System.out.print(i + " ");
}
}
}
[1077]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
for(int i = 0; i <= a; i++) {
System.out.println(i);
}
}
}
[1078]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int sum = 0;
for(int i = 0; i <= a; i++) {
if(i % 2 == 0) {
sum += i;
}
}
System.out.println(sum);
}
}
[1079]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(true){
char a = scanner.next().charAt(0);
if(a == 'q'){
System.out.println(a);
break;
}
System.out.println(a);
}
}
}
[1080]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int sum = 0;
int cnt = 0;
while(sum < a) {
cnt++;
sum += cnt;
}
System.out.println(cnt);
}
}
[1081]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++) {
System.out.println(i + " "+ j);
}
}
}
}
반응형
'Algorithm > CodeUp' 카테고리의 다른 글
[CodeUp]JAVA 1092~1099 (0) | 2021.03.19 |
---|---|
[CodeUp]JAVA 1082~1091 (0) | 2021.03.18 |
[CodeUp]JAVA 1062~1071 (0) | 2021.03.16 |
[Codeup]JAVA 1052~1061 (0) | 2021.03.15 |
[CodeUp]JAVA 1042~1051 (0) | 2021.03.14 |
Comments