結果

問題 No.661 ハローキティはりんご3個分
ユーザー YamaKasaYamaKasa
提出日時 2018-05-09 17:49:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 2,012 ms
コンパイル使用メモリ 71,680 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-10 11:26:51
合計ジャッジ時間 3,354 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,552 KB
testcase_01 AC 127 ms
56,224 KB
testcase_02 AC 127 ms
55,716 KB
testcase_03 AC 126 ms
55,700 KB
testcase_04 AC 127 ms
55,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int []a = new int[N];
		for(int i = 0; i < N; i++) {
			a[i] = scan.nextInt();
		}
		scan.close();
		for(int i = 0; i < N; i++) {
			if(a[i] % 8 == 0 && a[i] % 10 == 0) {
				System.out.println("ikisugi");
			}else if(a[i] % 10 == 0) {
				System.out.println("sugi");
			}else if(a[i] % 8 == 0) {
				System.out.println("iki");
			}else {
				System.out.println(a[i] / 3);
			}
		}
	}
}
0