Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import math 

xs = range(1,101)
def f(x):
  a = x % 6
  b = (a ** 2) % 7
  return b - math.sin(x)
max_x = 1
max_fx = float('-inf')
for x in xs:
  if f(x) > max_fx:
    max_fx = f(x)
    max_x = x
  # print(x, f(x))
print(max_x, max_fx)