Skip to content

Fix needed for Project Euler problem 234 sol1.py #3163

@dhruvmanila

Description

@dhruvmanila

Problem:

According to the problem description, the input value for the function solution() should be 999966663333. Now, if we follow the control flow of the problem we see that there's going to be a loop that will have 999966663333 many iterations and for each iteration this line asks the user for input. As mentioned in CONTRIBUTING.md, we cannot ask for input and this solution will be asking for the input for 999966663333 times.

for x in range(n):  # n = 999966663333 according to the problem description
    l = [i for i in input().split()]  # noqa: E741

Proposed solution:

  1. Remove the current solution and implement a new one.
  2. Take a look at the current solution and fix it.

The second solution is highly unlikely as I am not able to deduce what is actually going on in the function and why do we even need to ask for the input. If anyone can figure it out, they can submit a PR for this.

I propose the first solution.

Once the issue is fixed, we can start running this script which checks for all answers to Project Euler problems.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions