結果

問題 No.661 ハローキティはりんご3個分
ユーザー donkorin_donkorin_
提出日時 2018-03-09 22:28:14
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 857 bytes
コンパイル時間 1,800 ms
コンパイル使用メモリ 164,816 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-18 12:10:15
合計ジャッジ時間 2,333 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);i++)
#define erep(i,a,b) for(int i=a;i<=(int)(b);i++)
#define per(i,a,b) for(int i=(b)-1;i>(a);i--)
#define eper(i,a,b) for(int i=((int)(a));i>=b;i--)
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
const ll INF=100000000000000LL;
const int MOD=1000000007;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}

int n; 
int main() {
 ios::sync_with_stdio ( false );
 cin.tie ( 0 );
    cin >> n;
    rep(i, 0, n) {
        int a; cin >> a;
        if (a % 10 == 0) {
            if (a % 8 == 0) cout << "ikisugi" << endl;
            else cout << "sugi" << endl;
        } else {
            if (a % 8 == 0) cout << "iki" << endl;
            else if (a % 3 == 0) cout << a / 3 << endl;
        }
    }
    return 0;
}
0