Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: Peter's Files
Views: 3893
Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu1804
Kernel: SageMath 9.1

1

s = 0 for i in range(1000): if i % 3 == 0 or i % 5 == 0: s += i print(s)
233168

4

largest = 0 largest_pair = (0,0) for a in range(100, 1000): for b in range(100, 1000): p = a * b if str(p) == str(p)[::-1]: if p > largest: largest = p largest_pair = (a,b) print(largest_pair)
(913, 993)