Coding Test(63)
-
[JAVA] 백준 1단계 입출력과 사칙연산
2557 Hello World나의 답)public class Main { public static void main(String[] args) { System.out.println("Hello World!"); }}1000 A+B나의 답1) 176msimport 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); }} 나의 답..
2024.09.03 -
[Python] 윤년
# 정수 입력 받기# 윤년이면 1, 아니면 0 출력# 윤년 조건: 4의 배수 && 100의 배수가 아닐 때 || 400의 배수일 때x = int(input())if ((x % 4 == 0) and (x % 100 != 0) or (x % 400 == 0)): print('1')else: print('0')
2024.07.17 -
[Python] 시험 성적
# 정수 입력 받기# 조건에 맞게 성적 출력하기score = int(input())if (90 개선한 코드score = int(input())if score >= 90: print("A")elif score >= 80: print("B")elif score >= 70: print("C")elif score >= 60: print("D")else: print("F")
2024.07.17 -
[Python] 두 수 비교하기
# 두 정수 입력 받기(공백 한 칸으로 구분)# > b): print('>')elif (a == b): print('==')else: print('
2024.07.17 -
[Python] 개
print('|\_/|')print('|q p| /}')print('( 0 )\"\"\"\\')print('|"^"` |')print('||_/=\\\__|')
2024.07.17 -
[Python] 고양이
print('\\ /\\')print(' ) ( \')')print('( / )')print(' \(__)|')
2024.07.17