結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-26 22:28:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 1,686 ms |
| コンパイル使用メモリ | 164,936 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 02:18:57 |
| 合計ジャッジ時間 | 2,346 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 6 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int main(){
ll n;cin>>n;
ll a=n/2,b=n-n/2;
if(__builtin_popcount(a)==1||__builtin_popcount(b)==1)puts("-1");
else cout<<a<<' '<<b<<endl;
}