結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2020-06-05 16:03:55 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 934 bytes |
コンパイル時間 | 2,792 ms |
コンパイル使用メモリ | 72,552 KB |
実行使用メモリ | 36,544 KB |
最終ジャッジ日時 | 2024-12-16 00:54:13 |
合計ジャッジ時間 | 2,988 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 |
ソースコード
public class Main {public static void main(String[] args) {int r = 0;int max_day = 0;int w10 = 0;int w1 = 0;for (int i = 1; i < 12; i++){switch (i){case 1:case 3:case 5:case 7:case 8:case 10:case 12:max_day = 31;case 2:max_day = 28;case 4:case 6:case 9:case 11:max_day = 30;}for (int j = 1; j < max_day; j++){w10 = j / 10;w1 = j % 10;if (i == w10 + w1){r += 1;//System.out.println(i + "月" + j + "日");}}}System.out.println(r);}}