結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-27 00:21:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 275 bytes |
| コンパイル時間 | 605 ms |
| コンパイル使用メモリ | 53,716 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 02:41:56 |
| 合計ジャッジ時間 | 5,417 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 5 WA * 3 TLE * 4 |
ソースコード
#include <iostream>
#define ZERO 0
using namespace std;
int main(){
int n, res=-1;
cin >> n;
for(int i=1; i<=n/2; i++){
if((i&(i-1)&&((n-i)&(n-i-1)))){
res=i;
}
}
if(res==-1) cout << res << endl;
else cout << res << n-res << endl;
return 0;
}