fork download
  1. def numbers_other():
  2. for i in range(1001):
  3. if i % 3 == 0:
  4. if i % 5 != 0:
  5. j = len( str(i) )
  6. sum = 0
  7. while j != 0 and sum < 10:
  8. sum += int( str(i)[j-1] )
  9. j -= 1
  10. if sum < 10:
  11. print(i, end=" ")
  12.  
  13. numbers_other()
  14. # your code goes here
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
3 6 9 12 18 21 24 27 33 36 42 51 54 63 72 81 102 108 111 114 117 123 126 132 141 144 153 162 171 201 204 207 213 216 222 231 234 243 252 261 303 306 312 321 324 333 342 351 402 411 414 423 432 441 501 504 513 522 531 603 612 621 702 711 801