We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #207: Integer partition equations
Project Euler #207: Integer partition equations
Sort by
recency
|
39 Discussions
|
Please Login in order to post a comment
i am getting timeout:
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution {
}
Something wrong with my solution. Can't understand what. It does not passed a couple of tests within timeout error:
import math
q = int(input().rstrip())
for _ in range(q): a, b = map(int, input().rstrip().split())
pn = 1 if b/a > 10000: pn = int(math.log(int(b/a),2)) - 1 if pn < 1: pn = 1 start_p2 = 2**pn if pn > 1: start_p2 -=1 start_num_1 = pn
can anyone explain me why P(15)=2/3 and P(20)=1/2
can anyone explain me how P(15)=2/3 and why P(20)=1/2
Need help to understand the problem. I mean how we are getting P(6) = 1/2?