結果

問題 No.638 Sum of "not power of 2"
ユーザー Mcpu3
提出日時 2018-09-04 21:14:21
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-15 17:51:04
合計ジャッジ時間 986 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <math.h>

int main(void)
{
    long n,i;
    scanf("%ld",&n);
    if(n-3>2){
        for(i=2;i<60;++i)if((long)pow(2,i)==n-3)break;
        if(i==60)printf("3 %ld",n-3);
        else printf("5 %ld",n-5);
    }
    else puts("-1");
    return 0;
}
0