結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2016-10-20 16:36:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 2,134 ms |
コンパイル使用メモリ | 73,820 KB |
実行使用メモリ | 49,608 KB |
最終ジャッジ日時 | 2024-12-31 01:08:52 |
合計ジャッジ時間 | 2,715 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
public class Main {public static void main(String[] args) {int endmonth[] = {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 <= endmonth[i-1] ; j++){int day = 0;int tenday = j/10;if (tenday != 0){day = j-(tenday*10);}else{day = j;}if(day+tenday ==i){count++;}}}System.out.println(count);}}