반응형
2557번
1
2
3
4
5
|
public class _2557 {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
|
cs |
10718번
1
2
3
4
5
6
7
|
public class Main{
public static void main(String[] args) {
System.out.println("강한친구 대한육군");
System.out.println("강한친구 대한육군");
}
}
|
cs |
10717번
1
2
3
4
5
6
7
8
9
|
public class Main{
public static void main(String[] args) {
System.out.println("\\ /\\");
System.out.println(" ) ( ')");
System.out.println("( / )");
System.out.println(" \\(__)|");
}
}
|
cs |
10172번
1
2
3
4
5
6
7
8
9
10
|
public class Main {
public static void main(String[] args) {
System.out.println("|\\_/|");
System.out.println("|q p| /}");
System.out.println("( 0 )\"\"\"\\");
System.out.println("|\"^\"` |");
System.out.println("||_/=\\\\__|");
}
}
|
cs |
1000번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
System.out.println(A + B);
}
}
|
cs |
1001번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
System.out.println(A - B);
}
}
|
cs |
10998번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
System.out.println(A * B);
}
}
|
cs |
1008번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
double A = Double.parseDouble(st.nextToken());
double B = Double.parseDouble(st.nextToken());
System.out.println(A / B);
}
}
|
cs |
10869번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
System.out.println(A + B);
System.out.println(A - B);
System.out.println(A * B);
System.out.println(A / B);
System.out.println(A % B);
}
}
|
cs |
10430번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
st = new StringTokenizer(br.readLine()," ");
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
int C = Integer.parseInt(st.nextToken());
System.out.println((A+B)%C);
System.out.println(((A%C) + (B%C))%C);
System.out.println((A*B)%C);
System.out.println(((A%C) * (B%C))%C);
}
}
|
cs |
2588번
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int A = Integer.parseInt(br.readLine());
int B = Integer.parseInt(br.readLine());
int result = A * B;
while(B > 0) {
sb.append(A * (B % 10) + "\n");
B /= 10;
}
sb.append(result);
System.out.println(sb);
}
}
|
cs |
반응형
'백준' 카테고리의 다른 글
백준 3단계(for문) (0) | 2021.04.01 |
---|---|
백준 2단계(if문) (0) | 2021.03.31 |
[백준 / JAVA] 1918번 후위 표기식 (0) | 2021.01.21 |
[백준 / JAVA] 1406번 에디터 (0) | 2021.01.20 |
[백준 / JAVA] 2745번 진법 변환 (0) | 2021.01.11 |