728x90

https://solved.ac/


파이썬


브2 10809 알파벳 찾기


1
2
3
4
5
6
7
8
word = input()
result = ""
for i in range(26):
    try:
        result += (str(word.index(chr(97+i))) + " ")
    except:
        result += "-1 "
print(result)
cs


브3 10818 최소, 최대


1
2
3
num = input()
numArr = list(map(int,input().split())) 
print(min(numArr), max(numArr))
cs


브5 10869 사칙연산


1
2
3
4
5
6
num1, num2 = map(int, input().split())
print(num1+num2)
print(num1-num2)
print(num1*num2)
print(int(num1/num2))
print(num1%num2)
cs


브3 10871 X보다 작은 수


1
2
3
4
5
6
7
N, X = map(int, input().split())
numArr = list(map(int, input().split()))
result = ""
for i in range(N):
    if numArr[i] < X:
        result += (str(numArr[i]) + " ")
print(result)
cs


116ms


최단 시간 코드


1
2
3
a,b = map(int,input().split())
score = [x for x in input().split() if int(x)<b]
print(' '.join(score))
cs


브3 10950 A+B - 3


1
2
3
4
5
6
count = int(input())
result = ""
for i in range(count):
    n1, n2 = map(int, input().split())
    result += str(n1+n2)+"\n"
print(result)
cs


브3 10951 A+B - 4


1
2
3
4
5
6
7
8
result = ""
while True:
    try:
        n1, n2 = map(int, input().split())
        result += str(n1+n2)+"\n"
    except:
        break
print(result)
cs


브3 10952 A+B - 5


1
2
3
4
5
6
7
result = ""
while True:
    n1, n2 = map(int, input().split())
    if n1==0 and n2==0:
        break
    result += str(n1+n2)+"\n"
print(result)
cs


브5 10998 AXB


1
2
n1, n2 = map(int, input().split())
print(n1*n2)
cs


브5 11654 아스키 코드


1
print(ord(input()))
cs


브2 11720 숫자의 합


1
2
3
4
5
6
count = int(input())
num = input()
result = 0
for i in range(count):
    result += int(num[i])
print(result)
cs


76ms


최단 시간 코드


1
2
input()
print(sum(map(int, input())))
cs


52ms


728x90
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기