Username: 
Password: 
Restrict session to IP 

PyHash Questions  Go to the PyHash challenge

Global Rank: 231
Totalscore: 92244
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 280d




Last Seen: 1d 1h
The User is Offline
PyHash Questions
Google/translate0Thank You!0Good Post!0Bad Post! link
Hi, on challenge:

a number > 31337.0 is required. and 72258202379729527373824.0 is a valid one but it says that "Your answer seems wrong!".

Are we looking for the smallest number > 31337 that satisfies the condition?

Greetings,
xseris

I guess that's a good idea. Also i am disappointed by the python type system...
The geeks shall inherit the properties and methods of object earth.
Global Rank: 3
Totalscore: 679516
Posts: 71
Thanks: 65
UpVotes: 64
Registered: 10y 259d
jusb3`s Avatar








Last Seen: 5d 17h
The User is Offline
RE: PyHash Questions
Google/translate1Thank You!1Good Post!0Bad Post! link
Quite ambiguous challenge. We are suppsed to find certain value? What should the representation of the number be? Should it be integer? I can find quite a lot of numbers that fit the spec...
Global Rank: 231
Totalscore: 92244
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 280d




Last Seen: 1d 1h
The User is Offline
RE: PyHash Questions
Google/translate0Thank You!0Good Post!0Bad Post! link
Yeah, it is indeed a bit ambigous and "crappy"
I assumed one would try to calculate a number that fits.
Try integers.

If you try the first obvious number that fits, you get a message that a bigger number is required.
Now try to calculate the next number that would work.

Greetz
Giz
The geeks shall inherit the properties and methods of object earth.
Global Rank: 231
Totalscore: 92244
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 280d




Last Seen: 1d 1h
The User is Offline
RE: PyHash Questions
Google/translate0Thank You!0Good Post!0Bad Post! link
I am sorry for the confusion.
The challenge solution got changed, as i made a mistake in my calculations.

Also, in the code, "float" has been changed to "int".
I only wanted to point out that whole float number hashes are identical to their int partners.

Thanks to tehron for the fixes \o
The geeks shall inherit the properties and methods of object earth.
Global Rank: 28
Totalscore: 326407
Posts: 2
Thanks: 1
UpVotes: 1
Registered: 11y 343d








Last Seen: 11h 34m
The User is Offline
RE: PyHash Questions
Google/translate0Thank You!0Good Post!0Bad Post! link
Tanks for the clarification and for revisiting your calculations! Beyond the working floating point cited in the first post (that still produces 31337 as hash) I was also trying the integer solution without success till today. Now it works!
Global Rank: 1009
Totalscore: 25499
Posts: 20
Thanks: 19
UpVotes: 21
Registered: 1y 65d
Last Seen: 13d 20h
The User is Offline
RE: PyHash Questions
Google/translate2Thank You!1Good Post!0Bad Post! link
Quote from gizmore
May 15, 2024 - 21:19:56

I am sorry for the confusion.
The challenge solution got changed, as i made a mistake in my calculations.

Also, in the code, "float" has been changed to "int".
I only wanted to point out that whole float number hashes are identical to their int partners.

Thanks to tehron for the fixes \o


Hey gizmoire, thanks for the challenge!

A couple suggestions:

- You might want to also allow solutions created on 32-bit machines to work, or at least add a note on the challenge that only 64-bit machines will produce the expected result.
See my post in the solutions forum for more details.
I don't expect many people to be trying to solve this on 32-bit machines in 2024 and beyond, but you never know, we could save them some time of banging their heads against the wall!

- Also it's probably worth mentioning that this relies on an implementation detail of the CPython implementation of Python; the challenge page mentions a specific version (3.10), but the implementation is as relevant, if not more so.
There are other Python implementations out there that might not produce the expected result.
Global Rank: 231
Totalscore: 92244
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 280d




Last Seen: 1d 1h
The User is Offline
RE: PyHash Questions
Google/translate1Thank You!1Good Post!0Bad Post! link
Additional help was giving in the note:
Note: This challenge got tested with cpython, 64-bit, python3.10 and should be easy.
The geeks shall inherit the properties and methods of object earth.
tunelko, silenttrack, n0tHappy, nonfungiblesecurity, quangntenemy, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, SwolloW, dangarbri, csuquvq have subscribed to this thread and receive emails on new posts.
1 people are watching the thread at the moment.
This thread has been viewed 1709 times.