# Project Euler #244: Sliders

# Project Euler #244: Sliders

+ 1 comment I wonder why this task is marked as Easy. It isn't Easy for sure. On Project Euler it has 70% difficulty rating.

+ 3 comments For test input: 3 BBB BWR RRR RBR BWB RBR I found three solutions: {'DLURRULDDRUL', 'RULDDLURDRUL', 'RULDDRULDLUR'} with length 933 and their checksums are 87487882 57071685 42106079 respectfully. Which doesn't correspond to the answer given 86665639. Where I was wrong?

+ 3 comments we have [a] field

`N`

by`N`

[with]`(N²-1)/2`

red tiles and`N²/2`

blue tiles.So, for N=3 we have a field 3 by 3 - that's 9 tiles total - with 4 red tiles and 4½ blue tiles, good. What color is the last half tile?

+ 2 comments Hi there. Can anyone explain me why I can't pass last ten tests? I use BFS approach where it goes simultaneously from start position and from end position towards each other. It finds all solution pretty fast. I checked all examplaes in this site and also 4x4 example from https://projecteuler.net/ site. I think my checksum calculation is not correct. Can you check it?

def solution_checksum(solution): cs = 0 for c in solution: cs = (cs * 243 + ord(c)) % 100000007 return cs def solutions_checksum(solutions): checksums = [solution_checksum(s) for s in solutions] cs_sum = sum(checksums, 0) % 100000007 return cs_sum

+ 0 comments Hi. Can someone explain how to read input in JavaScript(node.js) in project euler?

Sort 29 Discussions, By:

Please Login in order to post a comment