๋ฐ์ํ
1041๋ฒ
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 = new StringTokenizer(br.readLine());
char a = st.nextToken().charAt(0);
a = (char) (a + 1);
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a);
pw.flush();
pw.close();
}
}
1042๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a / b);
pw.flush();
pw.close();
}
}
1043๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a % b);
pw.flush();
pw.close();
}
}
1044๋ฒ
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 = new StringTokenizer(br.readLine());
long a = Long.parseLong(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a + 1);
pw.flush();
pw.close();
}
}
1045๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a + b);
pw.println(a - b);
pw.println(a * b);
pw.println(a / b);
pw.println(a % b);
pw.printf("%.2f", (double) a / b);
pw.flush();
pw.close();
}
}
1046๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a + b + c);
pw.printf("%.1f", (double) (a + b + c) / 3 );
pw.flush();
pw.close();
}
}
1047๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a << 1);
pw.flush();
pw.close();
}
}
1048๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
pw.println(a << b);
pw.flush();
pw.close();
}
}
1049๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a > b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
1050๋ฒ
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 = new StringTokenizer(br.readLine());
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
br.close();
PrintWriter pw = new PrintWriter(System.out);
if (a == b) {
System.out.println(1);
} else {
System.out.println(0);
}
pw.flush();
pw.close();
}
}
๋ฐ์ํ
'Algorithm > CodeUp ๊ธฐ์ด 100์ ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1061~1070๋ฒ (0) | 2023.03.04 |
---|---|
[์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1051~1060๋ฒ (0) | 2023.03.04 |
[์ฝ๋์ ๊ธฐ์ด 100์ -C์ธ์ด] 1031~1040๋ฒ (0) | 2023.02.27 |
[์ฝ๋์ ๊ธฐ์ด 100์ -C์ธ์ด] 1021~1030๋ฒ (0) | 2023.02.27 |
[์ฝ๋์ ๊ธฐ์ด 100์ -C์ธ์ด] 1011~1020๋ฒ (0) | 2023.02.27 |
๋๊ธ