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
- ul 태그
- 실수 타입
- 콘솔로 변수값 출력
- 고양이 출력
- 키보드입력데이터
- 연산의 방향
- java
- 논리부정
- 백준 문제풀기
- oracle
- CSS
- 정수 연산
- 부호/증감 연산자
- 새싹 출력
- background-repeat 속성
- 위치속성
- 이클립스
- 박스 모델의 성격
- CSS 정리
- HTML
- 자바
- 대입연산자
- CSS 박스모델 구성
- 변수사용범위
- 연산자
- 강아지 출력
- 데이터베이스
- 삼항연산자
- 논리연산자
- background-size 속성
Archives
- Today
- Total
너와 나의 개발 고리
[백준 문제풀기] JAVA 입출력과 사칙연산(2557, 1000, 1001, 10998, 1008, 10869, 10926, 18108, 10430, 2588, 11382) 본문
백준 문제풀기
[백준 문제풀기] JAVA 입출력과 사칙연산(2557, 1000, 1001, 10998, 1008, 10869, 10926, 18108, 10430, 2588, 11382)
Oli-Viaaaa 2023. 9. 19. 09:40백준 문제풀기 > 입출력과 사칙연산 정답 코드
문제 번호 2257번

import java.util.*;
public class Main{
public static void main(String args[]){
System.out.println("Hello World!");
}
}
문제 번호 1000번

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a + b);
}
}
문제 번호 1001번

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a - b);
}
}
문제 번호 10998번

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a * b);
}
}
문제 번호 1008번

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
System.out.println(a/b);
}
}
문제 번호 10869번

import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
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);
}
}
문제 번호 10926번

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
System.out.println(str + "??!");
}
}
문제 번호 18108번

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int year = sc.nextInt();
System.out.println(year-543);
}
}
문제 번호 10430번

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
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);
}
}
문제 번호 2588번

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int A = in.nextInt();
int B = in.nextInt();
System.out.println(A*(B%10));
System.out.println(A*(B%100/10));
System.out.println(A*(B/100));
System.out.println(A*B);
}
}
문제 번호 11382번

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long A = sc.nextLong();
long B = sc.nextLong();
long C = sc.nextLong();
System.out.println(A+B+C);
}
}
