GO Solution For UVa 10299 - Relatives. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that a = xy and b = xz.

Input There are several test cases. For each test case, standard input contains a line w


You can find the full details of the problem Relatives at UVa Online Judge

Sample Input


Sample Output


Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985