結果

問題 No.638 Sum of "not power of 2"
ユーザー focusfocus
提出日時 2018-03-01 11:06:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 395 bytes
コンパイル時間 666 ms
コンパイル使用メモリ 74,044 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-08-25 18:28:21
合計ジャッジ時間 1,448 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,500 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<bitset>
#include<algorithm>
#include<cmath>
#include<string>
using namespace std;
int main(){ 
    long long N;
    cin >> N ;
    for(long long i=3;i<=N/2;i++){
        if(log2(i)!=floor(log2(i))&&log2(N-i)!=floor(log2(N-i))){
            cout << i << ' ' << N-i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}
0