結果
| 問題 | No.642 Two Operations No.1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-14 18:27:20 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 325µs | |
| コード長 | 133 bytes |
| 記録 | |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 73,460 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-02 12:37:05 |
| 合計ジャッジ時間 | 1,330 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
int n,c;
main()
{
cin>>n;
while(n>1)
{
if(n%2)c++,n++;
c++;n/=2;
}
cout<<c<<endl;
}