問題一覧 > 通常問題

No.661 Hello Kitty Weighs 3 Apples

レベル : / AI推定難易度 : 111 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 558
作問者 : kyamatsu / テスター : ciel
お気に入りにしたユーザー ProblemId : 1588 / 自分の提出
問題文最終更新日: 2026-07-01 00:41:20
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 186 (順位表) の他の問題:

Problem Statement

It is generally known that Hello Kitty's weight is equal to that of 3 apples.
Here, we define the weight of 3 apples as 1 Kitty.
Given a natural number N as input, output the value M, the weight of N apples in Kitties.
However, if N is a multiple of 8, output "iki"; if it is a multiple of 10, output "sugi"; and if it is both a multiple of 8 and a multiple of 10, output "ikisugi".

$N$ is a multiple of $3$, a multiple of $8$, or a multiple of $10$.

Input

$i$
$N_1$
$N_2$
$N_3$
.
.
.
$N_i$

The input consists of i+1 lines.
The i on the first line represents the number of lines given as input. (1≦i≦5)
Lines 2 through i+1 represent the integers given as input.
It is guaranteed that $N_x$ (1≦x≦i) is always 3*a, 8*a, or 10*a (a=0,1,2.....).
$ 1 \le N_x \le 1000000$

Output

The output consists of i lines.
For each input, output the integer that is the answer.
However, if the input is a multiple of 8, output the string "iki"; if it is a multiple of 10, output the string "sugi"; and if it is both a multiple of 8 and a multiple of 10, output the string "ikisugi".

Sample

Sample 1
Input
3
3
6
30
Output
1
2
sugi

Sample 2
Input
4
36
8
30
160
Output
12
iki
sugi
ikisugi

Even if an input satisfies both 3*a and 10*a (a=0,1,2.....) at the same time, as the third input does, the output of the string "sugi" takes priority. For any integer N, give priority to the conditions for outputting a string.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。