반응형
# 1073
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
int N = sc.nextInt();
if(N == 0) {
break;
}
System.out.println(N);
}
}
}
# 1074
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
while(N != 0) {
System.out.println(N);
N--;
}
}
}
# 1075
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
while (N != 0) {
N--;
System.out.println(N);
}
}
}
# 1076
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char start = 'a';
char eng = sc.nextLine().charAt(0);
do {
System.out.println(start);
start += 1;
} while(start <= eng);
}
}
# 1077
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int start = 0;
int N = sc.nextInt();
do {
System.out.println(start);
start += 1;
} while (start <= N);
}
}
# 1078
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int sum = 0;
for (int i = 0; i <= N; i++) {
if (i % 2 == 0) {
sum += i;
}
}
System.out.println(sum);
}
}
# 1079
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
char input = sc.next().charAt(0);
if (input == 'q') {
System.out.println(input);
break;
}
System.out.println(input);
}
}
}
# 1080
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int sum = 0;
for (int i = 0; i <= N; i++) {
sum += i;
if (sum >= N) {
System.out.println(i);
break;
}
}
}
}
# 1081
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();
for (int i = 1; i <= n; i++) {
for (int j = 1;j <= m; j++) {
System.out.printf("%d %d\n", i, j);
}
}
}
}
# 1082
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(16);
for(int i = 1; i < 16; i++) {
System.out.printf("%X*%X=%X\n", n, i, n*i);
}
}
}
반응형
'개인 공부 > JAVA' 카테고리의 다른 글
[JAVA] Code Up 기초 100제 (1088 ~ 1092) (0) | 2021.06.26 |
---|---|
[JAVA] Code Up 기초 100제 (1083 ~ 1087) (0) | 2021.06.25 |
[JAVA] Code Up 기초 100제 (1063 ~ 1072) (0) | 2021.06.23 |
[JAVA] Code Up 기초 100제 (1053 ~ 1062) (0) | 2021.06.22 |
[JAVA] Code Up 기초 100제 (1043 ~ 1052) (0) | 2021.06.21 |