結果
問題 | No.638 Sum of "not power of 2" |
ユーザー |
|
提出日時 | 2019-08-19 16:29:15 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 297 bytes |
コンパイル時間 | 1,880 ms |
コンパイル使用メモリ | 192,716 KB |
最終ジャッジ日時 | 2025-01-07 14:17:36 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; for (int i=1;i<min(n,100LL);i++) { ll b=n-i; if (i&(i-1)&&b&(b-1)) { cout<<i<<' '<<b<<endl; return 0; } } puts("-1"); return 0; }