Search found 62 matches

by DJohn
Tue Jun 02, 2020 4:19 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 713
Replies: 19
Views: 3059

Re: Problem 713

I wanted to make sure my assumption is correct: Each of the (working) fuses must have a current rating higher than the current used by the heater. Is that a valid assumption? The problem says nothing about current ratings, so you can assume that they play no part in it. Fuses are either working or ...
by DJohn
Tue May 19, 2020 7:56 pm
Forum: News, Suggestions, and FAQ
Topic: Posts/kudos
Replies: 1
Views: 438

Re: Posts/kudos

You have made x permanent posts (and y non-permanent), and got z kudos for your permanent posts (and w for the non-permanent).
by DJohn
Thu Apr 30, 2020 9:10 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 711
Replies: 6
Views: 1683

Re: Problem 711

The value given for S(1234) is. The value for S(12) isn't (it's using = instead of $\equiv$). Although in this case S(12) is much less than 1000000007, so it doesn't make any difference. It's common for programmers to see mod only as an operator, because that's the way the concept is expressed in pr...
by DJohn
Tue Apr 28, 2020 9:34 am
Forum: News, Suggestions, and FAQ
Topic: Removing incentive for spoilers
Replies: 14
Views: 3839

Re: Removing incentive for spoilers

1. Create a new PE account. Make it private. (Do not want to mess up the PE statistics.) 2. Pick a PE problem. (Preferably in problem number ascending order.) Try to solve it in a day or a few days. If you can solve the problem, done! (Make sure you read the solution thread for any other ways of so...
by DJohn
Tue Apr 28, 2020 8:59 am
Forum: News, Suggestions, and FAQ
Topic: Tips for someone trying to get top 50?
Replies: 3
Views: 1112

Re: Tips for someone trying to get top 50?

Also, have a library of building blocks that you can re-use. My single "top 100" came from seeing the problem very soon after it was published, and having already spent hours on a number of functions (used by several previous problems) that together did 90% of the work.
by DJohn
Thu Apr 09, 2020 9:58 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 003
Replies: 128
Views: 47853

Re: Problem 003

allemande wrote: Thu Apr 09, 2020 9:28 pm "The prime factors of 13195 are 5, 7, 13 and 29."

Yet, 35 is a prime factor of 13195 as well.
To be a prime factor, a factor needs to be prime. 35 = 5*7 is not.
by DJohn
Wed Apr 01, 2020 12:44 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 679
Replies: 2
Views: 969

Re: Problem 679

I don't know what you mean by "eliminating the duplicates". What duplicates? If I List all 15-letter words Count the number of occurrences of each keyword in each word, including overlapping occurrences as v6ph1 points out Delete the words that don't have exactly one occurrence of each keyword then ...
by DJohn
Sat Mar 28, 2020 4:40 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 192
Replies: 36
Views: 13165

Re: Problem 192

62831818251916/902212330695 is correct. The differences are very small, and the sort of error you get from floating point approximations will be much greater.
by DJohn
Wed Mar 04, 2020 10:34 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 704
Replies: 3
Views: 1290

Re: Problem 704

That value for S(10) looks familiar. You've likely misread the problem in the same way that I originally did. Check the definition of F carefully: it's the maximum value of g for a fixed n.
by DJohn
Wed Feb 26, 2020 10:01 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 703
Replies: 3
Views: 1681

Re: Problem 703

Each function from B^3 to B maps three inputs to one output. There are 8 possibilities for the input, and a function is specified by giving an output independently for each of them. There are 2^8 = 256 ways of doing this, so there are 256 possible functions. In general, there are 2^(2^n) functions f...
by DJohn
Wed Nov 13, 2019 9:40 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 688
Replies: 8
Views: 2022

Re: Problem 688

You might be reading "We stack n plates into k non-empty piles" as "We stack n plates onto k non-empty piles", which (to me at least) has a quite different meaning. We start with nothing but n plates. Stacking takes place. Then we have k piles, none of which are empty. The question is concerned with...
by DJohn
Mon Oct 07, 2019 10:43 pm
Forum: News, Suggestions, and FAQ
Topic: Problem 94 typo
Replies: 3
Views: 1168

Re: Problem 94 typo

That's standard terminology. Integer is the noun, integral the adjective.
by DJohn
Mon Sep 23, 2019 5:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 680
Replies: 2
Views: 975

Re: Problem 680

The question says that for some K iterations, one array value needs to be swapped with another array value in A. That is not what the question says. the $j$-th operation consists of reversing the order of those elements in $A$ with indices between $s_j$ and $t_j$ So if the array is 0, 1, 2, 3, 4, 5...
by DJohn
Mon Sep 09, 2019 4:49 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 503
Replies: 10
Views: 3905

Re: Problem 503

A strategy is just a function from "what has happened so far" to "what to do next". There are only n cards and games can't go on forever, so there's a finite number of possibilities for "what has happened so far" and a finite number of possible strategies. For small n it's possible to test all of th...
by DJohn
Tue Aug 06, 2019 9:43 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 137
Replies: 10
Views: 3828

Re: Problem 137

RishadanPort wrote: Mon Aug 05, 2019 11:22 pm IE x = -2 and x = 1/2 both result in Af(x) = 2
$A_F(-2) \neq 2$. It doesn't converge.
by DJohn
Tue Jul 30, 2019 9:48 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 111
Replies: 28
Views: 7559

Re: Problem 111

RishadanPort wrote: Tue Jul 30, 2019 5:08 am I am assuming the same prime can be in 2 or more categories, and have it's sum added in multiple times?
It doesn't happen in the case of 4 digit primes, but there's nothing in the problem statement that rules it out. Each S() is evaluated independently.
by DJohn
Mon Jul 29, 2019 1:31 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 111
Replies: 28
Views: 7559

Re: Problem 111

I might be missing something... But why doesn't the question just ask: "What is the sum of all 10 digit primes"... end of question. Simply because the solution is not the sum of all 10 digit primes. For 4 digit numbers, 1013 is prime, but we don't include it in S(4, 1) because it only has 2 1s and ...
by DJohn
Fri Jun 14, 2019 5:09 pm
Forum: News, Suggestions, and FAQ
Topic: Errors/Warnings/Bugs
Replies: 573
Views: 153251

Re: Errors/Warnings/Bugs

Problem 411 is missing its picture.
by DJohn
Wed May 08, 2019 11:30 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 177
Replies: 24
Views: 13655

Re: Problem 177

I'm wondering if the tolerance could be wrong for the way I'm calculating this problem. Is it possible that, given my calculation method / choice of language, the tolerance should actually be 10^(-8) or 10^(-10) or something? For the method that I used, at least, it's quite tolerant of varying tole...
by DJohn
Fri Apr 05, 2019 4:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 663
Replies: 11
Views: 3662

Re: Problem 663

Just wanted to check, say the array $A_n = [8, -1, 2, 3, -5, 6, -100, 2, 4, 6]$, so would the maximum sub-array sum be $8 + (- 1) + 2 + 3 + (- 5) + 6 = 13$. So if negative values can be "absorbed", we should "absorb" them? That's what the definition of M implies, and you won't get the right value f...