結果

問題 No.661 ハローキティはりんご3個分
ユーザー jiang0503jiang0503
提出日時 2018-03-18 14:22:33
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 929 bytes
コンパイル時間 1,114 ms
コンパイル使用メモリ 61,332 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-26 23:03:22
合計ジャッジ時間 1,211 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;

int checkNumber(int tmp)
{
    if(tmp%8==0)
    {
        if(tmp%10==0)
            return 0;
        else
            return 1;
    }
    else if(tmp%10==0)
        return 2;

    return 3;
}

int main() {

    int num;
    int member;
    vector<int> array;

    cin>>num;
    array.resize(num);

    for(int i=0; i<num; i++)
    {
        cin>>array[i];
    }

    for(int i=0; i<num; i++)
    {
        member=checkNumber(array[i]);
        switch(member)
        {
            case 0:
                cout<<"ikisugi"<<endl;
                break;
            case 1:
                cout<<"iki"<<endl;
                break;
            case 2:
                cout<<"sugi"<<endl;
                break;
            case 3:
                cout<<array[i]/3<<endl;
                break;
            default:
                break;
        }
    }

    return 0;
}
0