fork(1) download
  1. def calculator(N):
  2. if N % 2 == 0:
  3. result = 1
  4. for i in range(1, N):
  5. result = result * i
  6. else:
  7. result = 0
  8. for i in range(1, N):
  9. result = result + i
  10.  
  11. return result
  12.  
  13. print(calculator(11))
Success #stdin #stdout 0s 23296KB
stdin
Standard input is empty
stdout
55