-
-
Save naoyat/3a1baaeb45992b7a9d181c50e03986d3 to your computer and use it in GitHub Desktop.
SRM problem random picker
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
#!/usr/bin/env python | |
import random | |
import click | |
srm_without_editorial = ( | |
252, | |
471, 474, 478, 482, 485, 489, 491, 494, | |
501, 505, 582, | |
644, 689, 693, 694, 695, 696, 698, | |
703, 704, 705, 706, 707, 708, 709 | |
) | |
rational = ( # not included yet | |
453.5, 504.5, 526.5, | |
) | |
@click.command() | |
@click.option('--since', type=int, default=400) | |
def main(since): | |
since = max(144, since) # 144 = the oldest SRM available in practice room | |
while True: | |
r = random.randint(since, 710) | |
if r in srm_without_editorial: | |
continue | |
print 'SRM%d' % r | |
break | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment