1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import sys
a,b = sys.stdin.readline().split()
tmpA=[]
tmpB=[]
tmp=0
for i in range(len(a)):
tmpA.append( int (a[i]))
for i in range(len(b)):
tmpB.append( int (b[i]))
for i in range(len(tmpA)):
for j in range(len(tmpB)):
tmp+= tmpA[i]*tmpB[j]
print(tmp)
|
cs |
우선 pypy3로 풀었구요
최대 경우의수가 9999*9999 이므로 약 1억이거든요
시간이나 메모리 관리에 신경써야 할 문제 입니다.
반응형
'python-algorithm' 카테고리의 다른 글
[백준] 1264 (0) | 2021.01.06 |
---|---|
[백준] 1233 (0) | 2021.01.05 |
[백준] 20053 (0) | 2021.01.05 |
[백준] 19572 (0) | 2021.01.05 |
[백준] 18247 (0) | 2021.01.05 |
댓글