結果
問題 | No.381 名声値を稼ごう Extra |
ユーザー | uw_yu1rabbit |
提出日時 | 2021-04-03 00:40:45 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 4,725 ms |
コンパイル使用メモリ | 381,276 KB |
実行使用メモリ | 4,376 KB |
最終ジャッジ日時 | 2023-08-25 15:08:27 |
合計ジャッジ時間 | 14,903 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
コンパイルメッセージ
main.cpp:6:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type] 6 | main(){ | ^~~~
ソースコード
#include<iostream> #include<algorithm> #include<boost/multiprecision/cpp_int.hpp> using namespace std; namespace mp = boost::multiprecision; main(){ mp::cpp_int x; cin >> x; mp::cpp_int ans = 0, t = 0; while (x){ t += x; if(ans < t + x) { ans = t + x; } x /= 2; } if(ans <t) {ans = t;} cout<<ans<<endl; }