結果

問題 No.661 ハローキティはりんご3個分
ユーザー vrjfsyi
提出日時 2018-04-01 16:48:48
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 593 bytes
コンパイル時間 616 ms
コンパイル使用メモリ 68,480 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 05:40:47
合計ジャッジ時間 1,010 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <map>
#include <stack>
#include <queue>
#include <set>

using namespace std;

string show(int N) {
    if ((N % 8 == 0) and (N % 10 == 0)) {
        return "ikisugi";
    } else if (N % 8 == 0) {
        return "iki";
    } else if (N % 10 == 0) {
        return "sugi";
    } else {
        return to_string(N / 3);
    }
}

int main() {


    int i;
    cin >> i;
    long N;
    for (int j = 0; j < i; ++j) {
        cin >> N;
        cout << show(N) << "\n";
    }


    return 0;
}

0