結果

問題 No.661 ハローキティはりんご3個分
ユーザー GodNegotoGodNegoto
提出日時 2019-11-27 15:35:57
言語 Java19
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 3,237 ms
コンパイル使用メモリ 72,604 KB
実行使用メモリ 56,328 KB
最終ジャッジ日時 2023-08-08 04:07:40
合計ジャッジ時間 4,601 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,468 KB
testcase_01 AC 119 ms
55,872 KB
testcase_02 AC 121 ms
53,880 KB
testcase_03 AC 118 ms
55,680 KB
testcase_04 AC 123 ms
56,328 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