Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Google Recruiting Board
next(e[i:10+i] for e, p in [[str((lambda a, l: 10**400 * sum(l) / a)(*(lambda a, l: [a, [a / i for i in l]])(*(lambda l: [reduce(lambda x, y: x*y, l), l])([(lambda f, x: f(f, x))(lambda r, y: y * r(r, y-1) if y > 1 else 1, i) for i in range(200)])))), reduce(lambda ps, t: ps + [t] if all(t % p for p in ps) else ps, [[], 2] + range(3, 100000, 2))]] for i in range(len(e)-9) if all(int(e[i:10+i]) % q for q in p))
next(e[i:10+i] for e, p in [[
str((lambda a, l: 10**400 * sum(l) / a)(*
(lambda a, l: [a, [a / i for i in l]])(*
(lambda l: [reduce(lambda x, y: x*y, l), l])(
[(lambda f, x: f(f, x))(
lambda r, y: y * r(r, y-1) if y > 1 else 1, i)
for i in range(200)])))),
reduce(
lambda ps, t: ps + [t] if all(t % p for p in ps) else ps,
[[], 2] + range(3, 100000, 2))]]
for i in range(len(e)-9)
if all(int(e[i:10+i]) % q for q in p))
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Nattawut Phetmak <http://about.me/neizod>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
{
"name": "google_recruiting",
"description": "find prime in the decimal of e number.",
"keywords": [
"prime",
"e",
"decimal"
]
}
print next(e[i:10+i] for e, p in [[str((lambda a, l: 10**400 * sum(l) / a)(*(lambda a, l: [a, [a / i for i in l]])(*(lambda l: [reduce(lambda x, y: x*y, l), l])([(lambda f, x: f(f, x))(lambda r, y: y * r(r, y-1) if y > 1 else 1, i) for i in range(200)])))), reduce(lambda ps, t: ps + [t] if all(t % p for p in ps) else ps, [[], 2] + range(3, 100000, 2))]] for i in range(len(e)-9) if all(int(e[i:10+i]) % q for q in p))
# expected value is:
# 7427466391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.