結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
beet
|
| 提出日時 | 2018-01-26 22:21:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 288 bytes |
| コンパイル時間 | 1,772 ms |
| コンパイル使用メモリ | 157,520 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 02:15:24 |
| 合計ジャッジ時間 | 2,447 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 5 WA * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
Int n;
cin>>n;
for(Int i=1;i<n;i++){
Int x=i,y=n-i;
if(__builtin_popcountll(x)!=1&&__builtin_popcountll(y)!=1){
cout<<x<<endl;
return 0;
}
}
cout<<-1<<endl;
return 0;
}
beet