-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevisors.py
More file actions
23 lines (19 loc) · 1.18 KB
/
devisors.py
File metadata and controls
23 lines (19 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import sys
def f(x):
if x == 1:
return 1
ret = 2
for i in range(2, int(x**0.5)+1):
if x % i == 0:
if x/i == i:
ret += 1
else:
ret += 2
return ret
ext = [[1, 1], [2, 2], [3, 2], [4, 3], [6, 4], [8, 4], [10, 4], [12, 6], [18, 6], [20, 6], [24, 8], [30, 8], [36, 9], [48, 10], [60, 12], [72, 12], [84, 12], [90, 12], [96, 12], [108, 12], [120, 16], [168, 16], [180, 18], [240, 20], [336, 20], [360, 24], [420, 24], [480, 24], [504, 24], [540, 24], [600, 24], [630, 24], [660, 24], [672, 24], [720, 30], [840, 32], [1080, 32], [1260, 36], [1440, 36], [1680, 40], [2160, 40], [2520, 48], [3360, 48], [3780, 48], [3960, 48], [4200, 48], [4320, 48], [4620, 48], [4680, 48], [5040, 60], [7560, 64], [9240, 64], [10080, 72], [12600, 72], [13860, 72], [15120, 80], [18480, 80], [20160, 84], [25200, 90], [27720, 96], [30240, 96], [32760, 96], [36960, 96], [37800, 96], [40320, 96], [41580, 96], [42840, 96], [43680, 96], [45360, 100], [50400, 108], [55440, 120], [65520, 120], [75600, 120], [83160, 128], [98280, 128]]
n = int(input())
ans = [0, 0]
for x, y in ext:
if x <= n:
ans = [x, y]
print(*ans, sep='\n')