結果
問題 |
No.378 名声値を稼ごう
|
ユーザー |
![]() |
提出日時 | 2017-09-06 17:20:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 258 bytes |
コンパイル時間 | 416 ms |
コンパイル使用メモリ | 55,028 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 03:08:51 |
合計ジャッジ時間 | 1,126 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
#include <iostream> using namespace std; int main(){ unsigned long long N, normal=0, skill=0; cin >> N; while(N > 0){ if(skill < normal+N*2) skill = normal+N*2; normal += N; N /= 2; } cout << skill - normal << endl; return 0; }