Algorithm (105) 썸네일형 리스트형 [SWEA] 2025. N줄덧셈 D1 JAVA 문제 이해 더보기 val까지의 합을 구하는 문제 아이디어 더보기 for문 활용 코드 import java.util.Scanner; import java.io.FileInputStream; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int val = sc.nextInt(); sc.close(); int sum = 0; for(int i=1;i [SWEA] 1938. 아주 간단한 계산기 D1 JAVA 문제 이해 더보기 4칙 연산을 출력해보는 문제 아이디어 더보기 4칙 연산을 출력하자 코드 import java.util.Scanner; import java.io.FileInputStream; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int a= sc.nextInt(); int b= sc.nextInt(); sc.close(); //1.+ System.out.println(a+b); //2.- System.out.println(a-b); //3.* System.out.println(a*b); //4./ System.out.println(a/b); .. [SWEA] 1933. 간단한 N 의 약수 D1 JAVA 문제 이해 더보기 아이디어 더보기 코드 import java.util.Scanner; import java.io.FileInputStream; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); sc.close(); for(int i=1;i [SWEA] 1936. 1대1 가위바위보 D1 JAVA 문제 이해 더보기 아이디어 더보기 코드 import java.util.Scanner; import java.io.FileInputStream; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); String[] str = sc.nextLine().split(" "); int a = Integer.parseInt(str[0]); int b = Integer.parseInt(str[1]); sc.close(); String output = (a+1)%3 > (b+1)%3 ? "A":"B"; System.out.println(output); } } 집사는개발자가되.. [SWEA] 2019. 더블더블 D1 JAVA 문제 이해 더보기 아이디어 더보기 코드 import java.util.Scanner; import java.io.FileInputStream; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int Loop = sc.nextInt(); sc.close(); int output=1; System.out.print(output+" "); for(int i=1;i [SWEA] 1545. 거꾸로 출력해보아요 D1 JAVA 문제 이해 더보기 아이디어 더보기 입력받은 걸 거꾸로 출력하면 된다. 코드 import java.util.*; import java.io.*; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int tc = T; tc >= 0; tc--) { System.out.print(tc+" "); } sc.close(); } } 집사는개발자가되고파 choppadontbiteme.tistory.com 이전 1 ··· 14 15 16 17 18 다음