GoLang Solution For UVa Online Judge: 10696 - f91
GO Solution For UVa 10696 - f91. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.
Problem Description
McCarthy is a famous theorician of computer science. In his work, he defined a recursive function, called f91, that takes as input a positive integer N and returns a positive integer defined as follows:
• If N ≤ 100, then f91(N) = f91(f91(N + 11));
• If N ≥ 101, then f91(N) = N − 10.
Write a prog
...You can find the full details of the problem f91 at UVa Online Judge
Sample Input
500 91 0
Sample Output
f91(500) = 490 f91(91) = 91
Solution: Please check the main.go snippet for the solution.
Solution originally posted at: Github by @codingsince1985
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.