Cod sursa(job #3227403)
Utilizator | Data | 30 aprilie 2024 10:40:08 | |
---|---|---|---|
Problema | BFS - Parcurgere in latime | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.31 kb |
#include <iostream>
using namespace std;
int main()
{
unsigned long long x;
int nr=0;
cin>>x;
while(x)
{
if(x%2==1)
{
nr++;
}
x/=2;
}
if(nr==1)
{
cout<<"DA";
}
else
{
cout<<"NU";
}
}