Beta
RegEx Like a Boss #5 CodeGolf: Decimal Number Divisible By 3
28sgerodes
Description:
Create a Regular Expression that matches a string representing a number divisible by 3.
Matching with re.match()
Should match:
-3
0
3
6
9
18
24
30
48
51
69
72
81
96
Should NOT match
-03
-5
-0
1
2
4
5
7
8
10
11
13
14
16
20
Restrictions
- numbers can be as positive as negative
- leading zeros are not allowed
- CodeGolf : string length is restricted to 150 characters
- random numbers will range from -10^10 to 10^10
This tools may help you:
Mathematics
Regular Expressions
Strings
Fundamentals
Restricted
Algorithms
Similar Kata:
Stats:
Created | Jan 3, 2019 |
Published | Jan 3, 2019 |
Warriors Trained | 187 |
Total Skips | 54 |
Total Code Submissions | 251 |
Total Times Completed | 28 |
Python Completions | 28 |
Total Stars | 9 |
% of votes with a positive feedback rating | 87% of 15 |
Total "Very Satisfied" Votes | 12 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 15 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 2 kyu |
Lowest Assessed Rank | 6 kyu |