Skip to content

Working solution is not accepted by Kata #302

@Diasell

Description

@Diasell

KATA: Sum of many ints
LANGUAGE: Python

MY SOLUTION:

def f(n, m):
    rest = n%m
    sum1 = (m*(m-1))/2
    sum2 = (rest*(rest+1))/2
    return sum1 * (n/m) + sum2

Description
Each time i run the code it gives me an random test failure and if i run the same script locally on my machine i would get the correct result

Check the screenshots that i've attached to this issue:

codewars_bug1
codewars_bug1_1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions