A. Ultra-Fast Mathematician time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Shapur was an extremely gifted student. He was great at everything including Combinatorics, Algebra, Number Theo…