結果
| 問題 |
No.638 Sum of "not power of 2"
|
| ユーザー |
srup٩(๑`н´๑)۶
|
| 提出日時 | 2018-06-11 23:55:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 411 bytes |
| コンパイル時間 | 1,206 ms |
| コンパイル使用メモリ | 158,644 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-30 13:46:45 |
| 合計ジャッジ時間 | 1,773 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
int main(int argc, char const *argv[])
{
ll n; cin >> n;
for (ll i = 0; i < n; ++i)
{
if ((i & (i - 1)) == 0) continue;
ll j = n - i;
if ((j & (j - 1)) == 0) continue;
printf("%lld %lld \n", i, j);
return 0;
}
printf("-1\n");
return 0;
}
srup٩(๑`н´๑)۶