結果

問題 No.642 Two Operations No.1
ユーザー 👑 CleyL
提出日時 2020-01-09 17:29:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 107 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 63,504 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-23 03:58:15
合計ジャッジ時間 1,103 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | int n,k,a;main(){cin>>n;++k;while(k<n)k*=2,a++;cout<<a+k-n<<endl;}
      |           ^~~~

ソースコード

diff #

#include <iostream>
using namespace std;
int n,k,a;main(){cin>>n;++k;while(k<n)k*=2,a++;cout<<a+k-n<<endl;}
0