結果

問題 No.661 ハローキティはりんご3個分
ユーザー Grenache
提出日時 2018-03-11 20:46:49
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 771 bytes
コンパイル時間 4,905 ms
コンパイル使用メモリ 74,560 KB
実行使用メモリ 54,216 KB
最終ジャッジ日時 2024-10-15 00:25:49
合計ジャッジ時間 5,335 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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