[SWEA] 2001: 파리퇴치 (JAVA)
2022. 7. 5. 18:27
Algorithm/SWEA
1 import java.util.Scanner; public class solution_d2_2001 { public static void main(String[] args) { // 2001 파리 퇴치 Scanner sc= new Scanner(System.in); int testcase=sc.nextInt(); for (int i=0; i
[SWEA] 1979: 어디에 단어가 들어갈수 있을까? (JAVA)
2022. 7. 5. 18:26
Algorithm/SWEA
1 import java.util.Scanner; public class solution_d2_1979 { public static void main(String[] args) { // 1979 어디에 단어가 들갈수있을까? //test case수 입력 Scanner sc = new Scanner(System.in); int TestCase = sc.nextInt(); //test case수 만큼 과정반복 for (int i = 0; i
[SWEA] 1959: 두개의 숫자열 (JAVA)
2022. 7. 5. 18:22
Algorithm/SWEA
1 import java.util.Scanner; public class solution_d2_1959 { public static void main(String[] args) { // 1959. 두개의 숫자열 Scanner sc = new Scanner(System.in); // 반복 횟수 int chaces = sc.nextInt(); // 반복 횟수만큼 반복 for (int i = 0; i
[SWEA] 2025: N줄 덧셈 (python)
2022. 7. 4. 17:47
Algorithm/SWEA
1 N= int(input()) sum=0 for i in range(N): sum+=i+1 print(sum) cs
[SWEA] 2019: 더블더블 (python)
2022. 7. 4. 17:45
Algorithm/SWEA
1 n=int(input()) result=1 num=[] for i in range(n+1): if (i==0): num.append(1) else: result=result*2 num.append(result) print(' '.join(map(str,num))) cs
[SWEA] 1938: 아주 간단한계산기 (python)
2022. 7. 4. 17:44
Algorithm/SWEA
1 a, b = map(int, input().split()) plus=a+b minus=a-b mult=a*b mod=a//b print(plus,minus,mult,mod,sep="\n") cs
[SWEA] 1936: 1대1 가위바위보 (python)
2022. 7. 4. 17:38
Algorithm/SWEA
1 A, B= map(int, input().split()) #가위 1 바위 2 보 3 if (A==1 and B==2): print("B") elif (A==3 and B==1): print("B") elif (A==2 and B==3): print("B") else: print("A") cs
[SWEA] 1933: 간단한수 N의 약수 (python)
2022. 7. 4. 17:36
Algorithm/SWEA
1 n=int(input()) cnt=0 num=[] for i in range(n): if (n%(i+1)==0): num.append(i+1) print(' '.join(map(str,num))) cs