結果
問題 |
No.638 Sum of "not power of 2"
|
ユーザー |
![]() |
提出日時 | 2018-02-14 04:12:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 605 bytes |
コンパイル時間 | 956 ms |
コンパイル使用メモリ | 78,728 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-16 03:26:48 |
合計ジャッジ時間 | 1,530 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <cstring> #include <math.h> #include <cmath> #include <limits.h> #include <map> #include <set> #include <queue> #include <algorithm> #include <functional> #include <stdio.h> using namespace std; long long MOD = 1000000007; int main() { long long N; cin >> N; for ( long long i = 3; i < N; i++ ) { long long a = i; long long b = N-i; if ( !((a&(a-1))==0) && !((b&(b-1))==0) ) { cout << i << " " << N-i << endl; return 0; } } cout << -1 << endl; return 0; }