1
2
3
4
|
class Solution:
def addStrings(self, num1: str, num2: str) -> str:
ans=int(num1)+int(num2)
return str(ans)
|
cs |
type casting 하면 됩니다 쉬워요
반응형
'python-algorithm' 카테고리의 다른 글
백준 2702 초6 수학 (0) | 2021.08.19 |
---|---|
백준 3040 백설 공주와 일곱 난쟁이 (0) | 2021.08.19 |
Leetcode 4. Median of Two Sorted Arrays (0) | 2021.08.19 |
Leetcode 1822. Sign of the Product of an Array (0) | 2021.08.19 |
Leetcode 344. Reverse String (0) | 2021.08.17 |
댓글