Snippets

cia_rana ボタンを押して数を作ろう

Created by cia_rana last modified
x;main(y){scanf("%d",&x);while(y+=1+x%2,x/=2);printf("%d",y-3);}
$n=<>;for($_=-2;$_+=1+$n%2,$n>>=1;){};print
n="%b"%gets;p n.count(?1)-2+n.size

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.