fork(3) download
  1. tips = [
  2. (0, 0, 0, 0),
  3. (1, 1, 1, 1),
  4. (6, 2, 4, 8),
  5. (1, 3, 9, 7),
  6. (6, 4, 6, 4),
  7. (5, 5, 5, 5),
  8. (6, 6, 6, 6),
  9. (1, 7, 9, 3),
  10. (6, 8, 4, 2),
  11. (1, 9, 1, 9)
  12. ]
  13. test = int(input())
  14. for z in range(1, test + 1):
  15. value_a = int(input())
  16. value_b = int(input())
  17.  
  18. x = value_a % 10
  19. y = value_b % 4
  20. counter = 0
  21.  
  22. for t in tips:
  23. if counter == x:
  24. z = int(t[y])
  25. counter += 1
  26.  
  27. print(z)
  28.  
  29.  
Runtime error #stdin #stdout #stderr 0.14s 23288KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 14, in <module>
EOFError: EOF when reading a line