結果

問題 No.3029 素因数
ユーザー latte0119latte0119
提出日時 2017-03-31 23:23:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 250 ms
コード長 955 bytes
コンパイル時間 1,281 ms
コンパイル使用メモリ 142,628 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-21 11:51:37
合計ジャッジ時間 2,975 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,384 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 1 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 1 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 2 ms
4,380 KB
testcase_33 AC 2 ms
4,376 KB
testcase_34 AC 2 ms
4,376 KB
testcase_35 AC 2 ms
4,376 KB
testcase_36 AC 2 ms
4,376 KB
testcase_37 AC 1 ms
4,380 KB
testcase_38 AC 1 ms
4,376 KB
testcase_39 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

int ans[44]={};

void f(int x){
    if(x==0)puts("even");
    else puts("odd");
}

signed main(){
    ans[1]=0;//
    ans[3]=1;//
    ans[5]=1;
    ans[7]=0;//
    ans[9]=1;//
    ans[11]=0;//
    ans[13]=1;//
    ans[15]=1;//
    ans[17]=0;//
    ans[19]=0;//
    ans[21]=0;//
    ans[23]=0;//
    ans[25]=0;//
    ans[27]=1;//
    ans[29]=1;//
    ans[31]=0;//
    ans[33]=0;//
    ans[35]=1;//
    ans[37]=0;/////?
    ans[39]=1;//

    int M;cin>>M;

    if(M%2==0){
        f(1);
        return 0;
    }

    f(ans[M]);

}
0