Day i do not know

This commit is contained in:
Electrominch
2022-10-18 00:45:31 +03:00
parent 01c5720116
commit 284b6ff10c
72 changed files with 1256 additions and 12 deletions

View File

@@ -0,0 +1,10 @@
namespace _231._Power_of_Two;
public class Solution
{
public bool IsPowerOfTwo(int n)
{
double log = Math.Log(n, 2);
return Math.Round(log, 12) == (int)log;
}
}