結果
問題 | No.642 Two Operations No.1 |
ユーザー |
![]() |
提出日時 | 2018-01-29 08:46:36 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 138 bytes |
コンパイル時間 | 428 ms |
コンパイル使用メモリ | 54,668 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 00:09:57 |
合計ジャッジ時間 | 1,044 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
#include <iostream> using namespace std; int n; int main(){ cin>>n; n--; int t=0; while(n){ t+=2-n%2; n/=2; } cout<<t<<endl; }