結果

問題 No.661 ハローキティはりんご3個分
ユーザー kohaku_kohaku
提出日時 2018-04-14 14:50:32
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 74,616 KB
実行使用メモリ 54,304 KB
最終ジャッジ日時 2024-06-26 22:12:00
合計ジャッジ時間 3,130 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for(int i = 0 ; i < n; i++) {
            int tmp = sc.nextInt();
            System.out.println(ans(tmp));
        }
    }
    
    static String ans(int num) {
        String s = "";
        if(num%40 == 0) {
            s = "ikisugi";
        } else if(num%8 == 0) {
            s = "iki";
        } else if(num%10 == 0) {
            s = "sugi";
        } else if(num%3 == 0) {
            s = String.valueOf(num/3);
        }
        return s;
    }
}
0