結果
問題 |
No.188 HAPPY DAY
|
ユーザー |
![]() |
提出日時 | 2017-04-30 11:20:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 51 ms / 1,000 ms |
コード長 | 777 bytes |
コンパイル時間 | 2,046 ms |
コンパイル使用メモリ | 73,892 KB |
実行使用メモリ | 49,904 KB |
最終ジャッジ日時 | 2024-12-31 01:37:13 |
合計ジャッジ時間 | 2,596 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { int[] cal = new int[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int[] days = new int[40]; for (int i = 0; i <= 3; i++) { for (int j = 0; j <= 9; j++) { days[i * 10 + j] = i + j; } } int counter = 0; for (int i = 1; i <= 12; i++) { for (int j = 1; j <= cal[i - 1]; j++) { if (i == days[j]) { counter += 1; } } } System.out.println(counter); } }