結果
| 問題 | No.638 Sum of "not power of 2" | 
| コンテスト | |
| ユーザー |  focus | 
| 提出日時 | 2018-03-01 11:03:41 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 423 bytes | 
| コンパイル時間 | 674 ms | 
| コンパイル使用メモリ | 75,220 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-24 04:16:59 | 
| 合計ジャッジ時間 | 1,300 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 8 WA * 4 | 
ソースコード
#include<iostream>
#include<vector>
#include<bitset>
#include<algorithm>
#include<cmath>
#include<string>
using namespace std;
int main(){ 
    int N;
    double n1,n2;
    cin >> N ;
    for(int i=3;i<=N/2;i++){
        n1 = log2(i);
        n2 = log2(N-i);
        if(n1!=floor(n1)&&n2!=floor(n2)){
            cout << i << ' ' << N-i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}
            
            
            
        