結果

問題 No.661 ハローキティはりんご3個分
ユーザー GrenacheGrenache
提出日時 2018-03-11 20:46:49
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 771 bytes
コンパイル時間 3,465 ms
コンパイル使用メモリ 74,964 KB
実行使用メモリ 41,548 KB
最終ジャッジ日時 2024-04-23 01:12:45
合計ジャッジ時間 4,959 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,548 KB
testcase_01 AC 122 ms
41,508 KB
testcase_02 AC 126 ms
40,292 KB
testcase_03 AC 122 ms
41,416 KB
testcase_04 AC 130 ms
41,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder661 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int i = sc.nextInt();

		for (int j = 0; j < i; j++) {
			int n = sc.nextInt();

			if (n % 8 == 0 && n % 10 == 0) {
				pr.println("ikisugi");
			} else if (n % 8 == 0) {
				pr.println("iki");
			} else if (n % 10 == 0) {
				pr.println("sugi");
			} else {
				pr.println(n / 3);
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0