Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- class Program
- {
- static string degree(ulong n) {
- while (n % 2 == 0 & n >= 1)
- {
- n = n / 2;
- }
- if (n == 1)
- {
- return "YES";
- }
- else
- {
- return "NO";
- }
- }
- static void Main()
- {
- ulong n;
- string input = Console.ReadLine();
- if (!ulong.TryParse(input, out n))
- {
- Console.WriteLine("wrong");
- }
- else {
- Console.WriteLine(degree(n));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement