Skip to content

Commit

Permalink
Solve Variations in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Jul 14, 2024
1 parent 7ced016 commit 50b3fc3
Show file tree
Hide file tree
Showing 6 changed files with 8,067 additions and 0 deletions.
10 changes: 10 additions & 0 deletions solutions/beecrowd/1632/1632.py
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)
17 changes: 17 additions & 0 deletions solutions/beecrowd/1632/generate_in.sh
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
Loading

0 comments on commit 50b3fc3

Please sign in to comment.