結果

問題 No.188 HAPPY DAY
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 21:46:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 1,000 ms
コード長 501 bytes
コンパイル時間 1,968 ms
コンパイル使用メモリ 70,992 KB
実行使用メモリ 55,740 KB
最終ジャッジ日時 2023-08-29 22:22:40
合計ジャッジ時間 2,662 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int [] Days = {31,28,31,30,31,30,31,31,30,31,30,31};
        int count=0;
        for(int i=1; i<=12; i++){
            for(int j=1; j<=Days[i-1]; j++){
                int a10 = j/10;
                int a01 = j%10;
                if(i==a10+a01){
                    count++;
                }
            }
        }
        System.out.println(count);
    }
}
0