-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
7ced016
commit 50b3fc3
Showing
6 changed files
with
8,067 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,10 @@ | ||
letters_with_three_options = ['a', 'e', 'i', 'o', 's', 'A', 'E', 'I', 'O', 'S'] | ||
|
||
t = int(input()) | ||
|
||
for _ in range(t): | ||
line = input().strip() | ||
variations = 1 | ||
for letter in line.strip(): | ||
variations *= 3 if letter in letters_with_three_options else 2 | ||
print(variations) |
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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
alphabet=(a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) | ||
|
||
tests=4000 | ||
|
||
echo $tests | ||
|
||
for _ in $(seq $tests); do | ||
n=$((RANDOM % 16 + 1)) | ||
for _ in $(seq $n); do | ||
echo -n "${alphabet[$((RANDOM % 52))]}" | ||
done | ||
echo "" | ||
done |
Oops, something went wrong.