結果

問題 No.661 ハローキティはりんご3個分
ユーザー GodNegotoGodNegoto
提出日時 2019-11-27 15:35:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 5,473 ms
コンパイル使用メモリ 74,424 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-04-25 21:52:49
合計ジャッジ時間 4,163 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
54,144 KB
testcase_01 AC 119 ms
54,188 KB
testcase_02 AC 118 ms
54,052 KB
testcase_03 AC 119 ms
54,032 KB
testcase_04 AC 109 ms
53,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package algo;

import java.util.ArrayList;
import java.util.Scanner;

import java.util.*;

public class sample7 {

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