Letter Primes
Submit
Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.
Problem
For the numbers 1 to 100, print the associated letter if the number is divisible by given prime.
The Yandere Dev way to do this would be :
for i in range(1,100):
if i%2==0:print("A")
elif i%3==0:print("B")
elif i%5==0:print("C")
elif i%7==0:print("D")
elif i%11==0:print("E")
elif i%13==0:print("F")
elif i%17==0:print("G")
elif i%19==0:print("H")
elif i%23==0:print("I")
elif i%29==0:print("J")
elif i%31==0:print("K")
elif i%37==0:print("L")
elif i%41==0:print("M")
elif i%43==0:print("N")
elif i%47==0:print("O")
elif i%53==0:print("P")
elif i%59==0:print("Q")
elif i%61==0:print("R")
elif i%67==0:print("S")
elif i%71==0:print("T")
elif i%73==0:print("U")
elif i%79==0:print("V")
elif i%83==0:print("W")
elif i%89==0:print("X")
elif i%97==0:print("Y")
else:print('1')
Find the shortest program to achieve the same.
Options
exec is denied
rejudge feature is enabled
now post-mortem time, all source codes will be revealed
Sample input:_
*NOTHING*
Sample output:
1
A
B
A
C
A
D
A
B
A
E
A
F
A
B
A
G
A
H
A
B
A
I
A
C
A
B
A
J
A
K
A
B
A
C
A
L
A
B
A
M
A
N
A
B
A
O
A
D
A
B
A
P
A
C
A
B
A
Q
A
R
A
B
A
C
A
S
A
B
A
T
A
U
A
B
A
D
A
V
A
B
A
W
A
C
A
B
A
X
A
D
A
B
A
C
A
Y
A
B
Ranking
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 68 | 0.0171 | 2024/01/27 13:51:12 | 0B / 29B / 39B |
2 | lynn | 74 | 0.0165 | 2024/01/30 06:34:32 | 0B / 62B / 12B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | rotary-o | 68 | 0.0606 | 2024/01/28 00:01:21 | 0B / 36B / 28B |
2 | Sisyphus | 68 | 0.0580 | 2024/01/30 09:19:20 | 0B / 31B / 35B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 54 | 0.0158 | 2024/01/22 09:51:00 | 0B / 18B / 36B |
2 | Sisyphus | 56 | 0.0149 | 2024/01/26 15:46:57 | 0B / 21B / 35B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | xnor | 72 | 0.0486 | 2024/01/29 15:24:47 | 0B / 61B / 11B |
2 | lynn | 72 | 0.0473 | 2024/01/30 06:35:33 | 0B / 61B / 11B |
3 | contina | 133 | 0.0449 | 2024/02/02 04:26:49 | 0B / 77B / 38B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | ' | 197 | 0.0240 | 2024/02/13 14:41:36 | 0B / 99B / 0B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 33 | 0.3074 | 2024/01/22 17:04:33 | 0B / 4B / 28B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 74 | 0.0139 | 2024/01/25 10:10:58 | 0B / 34B / 40B |
2 | rotary-o | 74 | 0.0138 | 2024/01/27 12:10:41 | 0B / 33B / 41B |
3 | chocobi | 99 | 0.0139 | 2024/01/25 20:52:54 | 0B / 49B / 50B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 63 | 0.0139 | 2024/01/25 11:42:09 | 0B / 45B / 16B |
2 | Sisyphus | 64 | 0.0158 | 2024/01/26 15:18:04 | 0B / 44B / 17B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | Fleur | 53 | 0.0116 | 2024/01/22 11:34:17 | 0B / 28B / 23B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 67 | 0.0957 | 2024/01/22 15:09:17 | 0B / 24B / 37B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | %20 | 181 | 0.0248 | 2024/01/24 02:13:07 | 0B / 0B / 0B |
2 | nameless | 272 | 0.0139 | 2024/01/30 20:03:04 | 0B / 0B / 0B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 15 | 0.2279 | 2024/01/26 20:20:20 | 6B / 4B / 3B |
2 | whio | 16 | 0.0727 | 2024/01/25 23:50:17 | 9B / 5B / 2B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 16 | 0.0383 | 2024/01/22 11:54:31 | 13B / 2B / 1B |
Rank | User | Size | Time | Date | Statistics |
---|
1 | tails | 32 | 0.0847 | 2024/01/24 21:41:23 | 14B / 9B / 6B |
2 | %20 | 37 | 0.0843 | 2024/01/24 19:10:24 | 19B / 7B / 8B |
3 | %20 (tails) | 31 | 0.0845 | 2024/02/05 12:10:19 | 14B / 8B / 6B |
Language Ranking_
Rank | Lang | User | Size | Score |
1 | gs2 | tails | 15 | 10000 |
2 | Nibbles | tails | 16 | 9375 |
3 | z80 | %20 (tails) | 31 | 4838 |
4 | Atlas | tails | 33 | 4545 |
5 | Bash | Fleur | 53 | 2830 |
6 | Perl | tails | 54 | 2777 |
7 | DOS | chocobi | 57 | 2631 |
8 | sed | tails | 63 | 2380 |
9 | Bash (builtins) | tails | 67 | 2238 |
10 | Ruby | rotary-o | 68 | 2205 |
11 | Ruby2 | rotary-o | 68 | 2205 |
12 | AWK | Fleur | 69 | 2173 |
13 | Python3 | xnor | 72 | 2083 |
14 | C | tails | 74 | 2027 |
15 | Scala | rotary-o(lynn) | 86 | 1744 |
16 | JavaScript | ZED.CWT | 91 | 1648 |
17 | Java | rotary-o(lynn) | 111 | 1351 |
18 | C# | rotary-o(lynn) | 144 | 1041 |
19 | Whitespace | %20 | 181 | 828 |
20 | PHP | ' | 197 | 761 |
21 | Lazy-K | tails | 530 | 283 |
return to the top page