You are viewing a single comment's thread. Return to all comments →
Short Python solution with lambda function
#!/bin/python3 import sys function = lambda n,c,m : n//c + 1/(m-1) * (n/c) - 1/(m-1) t = int(input().strip()) for a0 in range(t): n,c,m = input().strip().split(' ') n,c,m = [int(n),int(c),int(m)] print(int(function(n,c,m)))
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate Feast
You are viewing a single comment's thread. Return to all comments →
Short Python solution with lambda function