-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4e9255
commit 12450b7
Showing
6 changed files
with
884 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
|
||
zelda_letters = [ | ||
['z', 'Z'], | ||
['e', 'E'], | ||
['l', 'L'], | ||
['d', 'D'], | ||
['a', 'A'], | ||
] | ||
|
||
for line in sys.stdin: | ||
index = 0 | ||
for char in line: | ||
if char in zelda_letters[index]: | ||
index += 1 | ||
else: | ||
index = 0 | ||
if char in zelda_letters[index]: | ||
index += 1 | ||
|
||
if index == 5: | ||
print("Link Bolado") | ||
break | ||
else: | ||
print("Link Tranquilo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
TESTCASES=400 | ||
ALPHABET=({a..z} {A..Z}) | ||
UPPER_ZELDA=(Z E L D A) | ||
LOWER_ZELDA=(z e l d a) | ||
|
||
for _ in $(seq "${TESTCASES}"); do | ||
if [[ $((RANDOM % 2)) -eq 0 ]]; then | ||
for _ in $(seq "$((RANDOM % 20 + 1))"); do | ||
echo -n "${ALPHABET[$((RANDOM % 52))]}" | ||
done | ||
fi | ||
for i in {0..4}; do | ||
if [[ $((RANDOM % 6)) -gt 0 ]]; then | ||
if [[ $((RANDOM % 2)) -gt 0 ]]; then | ||
echo -n "${UPPER_ZELDA[${i}]}" | ||
else | ||
echo -n "${LOWER_ZELDA[${i}]}" | ||
fi | ||
else | ||
echo -n "${ALPHABET[$((RANDOM % 52))]}" | ||
fi | ||
done | ||
if [[ $((RANDOM % 2)) -eq 0 ]]; then | ||
for _ in $(seq "$((RANDOM % 20 + 1))"); do | ||
echo -n "${ALPHABET[$((RANDOM % 52))]}" | ||
done | ||
fi | ||
echo | ||
done |
Oops, something went wrong.