結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
ei1333333
|
| 提出日時 | 2018-01-26 22:23:54 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 319 bytes |
| コンパイル時間 | 1,883 ms |
| コンパイル使用メモリ | 193,036 KB |
| 最終ジャッジ日時 | 2025-01-05 07:56:04 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
int main()
{
int64 x;
cin >> x;
for(int64 i = 1; i < x; i++) {
auto j = x - i;
if(__builtin_popcount(i) > 1 && __builtin_popcount(j) > 1) {
cout << i << " " << j << endl;
return (0);
}
}
cout << -1 << endl;
}
ei1333333