sw expert academy-2058. 数値桁数の追加-python
2771 ワード
に答える
コード#コード#
# https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=1&contestProbId=AV5QPRjqA10DFAUq&categoryId=AV5QPRjqA10DFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=1&pageSize=10&pageIndex=1
# sw expert academy, d1: 2058. 자릿수 더하기, python3
def solve(n: str) -> int:
return sum(list(map(int, str(n))))
if __name__ == '__main__':
n = str(input())
print(solve(n))
結果
ソース&ハーブ
2058.ビット数の追加
GITHUB
Reference
この問題について(sw expert academy-2058. 数値桁数の追加-python), 我々は、より多くの情報をここで見つけました https://velog.io/@cosmos/sw-expert-academy-2058.-자릿수-더하기-pythonテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol