Author | jibancanyang |
Submission date | 2017-10-10 08:21:56.394130 |
Rating | 4597 |
Matches played | 327 |
Win rate | 48.93 |
Use rpsrunner.py to play unranked matches on your computer.
import time
import random
if input == "": # initialize variables for the first round
rockCount = paperCount = scissorsCount = 0
elif input == "R":
rockCount += 1
elif input == "P":
paperCount += 1
elif input == "S":
scissorsCount += 1
a, b, c = 0, 0, 0
cnt = 1
def get_it(bias):
bias += 1
x = int(time.time() / (bias + 1) * time.time() * 1341735)
y = (random.randint(1, bias * bias) + 1)
x = x % 144713
x = x * x * x
x = x % 13 + x % 17 + x % 233 + int(str(x)[-1]) + x % bias
x = x ** ((x % 7 + 1)) % 12321
x = x % 13 + x % 17 + x % 233 + int(str(x)[-1])
return x ^ y ^ bias & x & y | bias + y & x * y
act = ["S", "R", "P"]
x = get_it(cnt * cnt % 13)
output = act[x % 3]