結果
問題 | No.188 HAPPY DAY |
ユーザー |
|
提出日時 | 2021-03-24 20:02:02 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 21 ms / 1,000 ms |
コード長 | 994 bytes |
コンパイル時間 | 882 ms |
コンパイル使用メモリ | 104,960 KB |
実行使用メモリ | 17,280 KB |
最終ジャッジ日時 | 2024-11-26 23:21:12 |
合計ジャッジ時間 | 1,403 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;class Sample{public static void Main(){int count = 0;int num;for(int i = 1; i <= 12; i++){switch(i){case (2):num = 28;break;case (4):num = 30;break;case (6):num = 30;break;case (9):num = 30;break;case (11):num = 30;break;default:num = 31;break;}for(int j = 1; j <= num; j++){int month = j / 10;int day = j % 10;if (i == month + day){count++;}}}Console.WriteLine(count);}}