Skip to content

Getting different results in std_demo #13

Description

@vodelerk

I'm using go1.16.4 in windows 10.

when I try:

go run main.go < input.txt
im getting

0
5
0
4

but according to the video, it should be:
5
4
11
33

im using the following GCD function:

for {
if b == 0 {
return a
}
a, b = b, a%b
}

all the test cases passed for that GCD function,

can someone explain to me, what is going on?

thanks,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions