This commit is contained in:
2026-04-18 14:42:00 +05:00
commit ef77f101fa
96 changed files with 3134 additions and 0 deletions

14
labPython/lab3/TextFile13.py Executable file
View File

@@ -0,0 +1,14 @@
def sum(A:int)->int:
A = A * (1 - 2 * (A < 0))
# A=abs(A)
if A//10 > 0:
return A%10 + sum(A//10)
else:
return A
num_end = int(input())
num_multiply = int(input())
with open("e.txt", "w") as file:
for i in range(2, num_end+1):
if sum(i) == sum(i*num_multiply):
file.write(f"{i}\n")