結果
問題 | No.2241 Reach 1 |
ユーザー |
|
提出日時 | 2023-03-10 22:46:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 1,758 ms |
コンパイル使用メモリ | 164,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-18 04:52:21 |
合計ジャッジ時間 | 2,584 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 22 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<int,int> P;#define REP(i,n) for(int i=0;i<int(n);i++)int main(void){cin.tie(nullptr); ios_base::sync_with_stdio(false);ll i,j,k;ll N;cin >> N;ll a=1,e=0;for(i=1;;i++){a*=2;if(a>=N){e=i;break;}}cout << a-N+1 << endl;return 0;}