結果

問題 No.661 ハローキティはりんご3個分
ユーザー yukiteruyukiteru
提出日時 2018-07-31 16:53:03
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,355 bytes
コンパイル時間 764 ms
コンパイル使用メモリ 92,932 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 20:30:51
合計ジャッジ時間 1,228 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

//#include <bits/stdc++.h>
//#include <stdio.h>
#include<iostream>
#include<cstdio>
#include<bitset>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<string.h>
#include<cmath>
#include<utility>
#include<functional>
#include<map>
#include<set>
#include<cctype>
#include<fstream>


#define FOR(i, a, b) for( int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for( int i=(a);i>=(b);i--)
#define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++)
#define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000 //2000000000
#define LLINF 1000000000000000000 //9000000000000000000
#define PI 3.14159265358979
#define MAXI 7500000

using namespace std;
typedef long long int ll;
typedef pair< long long int, long long  int> P;
typedef string::const_iterator State;

int dy[5] = { 0,0,1,-1,0 };
int dx[5] = { 1,-1,0,0 ,0 };


int main(void) {

	int i;
	int n[6];

	cin >> i;
	FOR(j, 1, i) {
		cin >> n[j];
	}

	FOR(j, 1, i) {
		if (n[j] % 8 != 0 && n[j] % 10 != 0) {
			cout << n[j] / 3 << endl;
		}
		else if (n[j] % 8 == 0) {
			if (n[j] % 10 == 0) {
				cout << "ikisugi" << endl;
			}
			else {
				cout << "iki" << endl;
			}
		}
		else {
			if (n[j] % 10 == 0) {
				cout << "sugi" << endl;
			}
			else {
				cout << n[j] / 3 << endl;
			}
		}
	}

	return 0;
}
0