nouveaux challenges
This commit is contained in:
parent
14012de79a
commit
3f600ad598
@ -9,7 +9,7 @@ for line in lines:
|
||||
chunks = line.split("+")
|
||||
for chunk in chunks:
|
||||
s = chunk.split("x")
|
||||
color = "0" if s[0] == "1" else " "
|
||||
color = " " if s[0] == "1" else "#"
|
||||
count = int(s[1])
|
||||
print(color * count, end="")
|
||||
print("")
|
||||
|
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import crypt
|
||||
|
||||
f = open("/proc/sys/kernel/ns_last_pid", mode="r")
|
||||
pid = int(f.readlines()[0]) + 2
|
||||
pidcrypt = crypt.crypt(str(pid), "$1$awesome")
|
||||
os.system(f"./ch21 '{pidcrypt}'")
|
Loading…
x
Reference in New Issue
Block a user