n=int(input())
sum=0
for i in range(1,n+1):
    sum+=i
print(sum)

 

 

 

 

문제 : https://www.acmicpc.net/problem/8393

 

8393번: 합

n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오.

www.acmicpc.net

 

'Baekjoon > python' 카테고리의 다른 글

[백준 2741번] N 찍기  (0) 2022.04.21
[백준 15552번] 빠른 A+B  (0) 2022.04.20
[백준 10950번] A+B - 3  (0) 2022.04.20
[백준 2739번] 구구단  (0) 2022.04.19
[백준 2480번] 주사위 세 개  (0) 2022.04.16
T=int(input())
i=1
while i<=T:
    num1,num2=map(int,input().split())
    print(num1+num2)
    i+=1

 

 

 

 

문제 : https://www.acmicpc.net/problem/10950

 

10950번: A+B - 3

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

 

'Baekjoon > python' 카테고리의 다른 글

[백준 15552번] 빠른 A+B  (0) 2022.04.20
[백준 8393번] 합  (0) 2022.04.20
[백준 2739번] 구구단  (0) 2022.04.19
[백준 2480번] 주사위 세 개  (0) 2022.04.16
[백준 2525번] 오븐 시계  (0) 2022.04.15
num=int(input())
for i in range(1,10):
    print(num,'*',i,'=',num*i)

 

 

 

 

문제 : https://www.acmicpc.net/problem/2739

 

2739번: 구구단

N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다.

www.acmicpc.net

 

'Baekjoon > python' 카테고리의 다른 글

[백준 8393번] 합  (0) 2022.04.20
[백준 10950번] A+B - 3  (0) 2022.04.20
[백준 2480번] 주사위 세 개  (0) 2022.04.16
[백준 2525번] 오븐 시계  (0) 2022.04.15
[백준 2884번] 알람 시계  (0) 2022.04.14

+ Recent posts