Skip to content

Commit 67fda96

Browse files
style: format 1880_word_sum.py with black
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
1 parent 1bc0def commit 67fda96

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎exercises/1000_programs/medium/1880_word_sum.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ def word_to_number(word: str) -> int:
66

77

88
def is_sum_equal(firstWord: str, secondWord: str, targetWord: str) -> bool:
9-
return word_to_number(firstWord) + word_to_number(secondWord) == word_to_number(targetWord)
9+
return word_to_number(firstWord) + word_to_number(secondWord) == word_to_number(
10+
targetWord
11+
)
1012

1113

1214
if __name__ == "__main__":
1315
# Exemplos básicos para teste manual
1416
print(is_sum_equal("acb", "cba", "cdb")) # True
15-
print(is_sum_equal("aaa", "a", "aaaa")) # True
16-
print(is_sum_equal("a", "b", "c")) # False
17+
print(is_sum_equal("aaa", "a", "aaaa")) # True
18+
print(is_sum_equal("a", "b", "c")) # False

0 commit comments

Comments
 (0)