結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
kimny
|
| 提出日時 | 2017-11-15 11:45:51 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 1,000 ms |
| コード長 | 1,341 bytes |
| コンパイル時間 | 968 ms |
| コンパイル使用メモリ | 106,516 KB |
| 実行使用メモリ | 23,380 KB |
| 最終ジャッジ日時 | 2024-12-31 06:06:16 |
| 合計ジャッジ時間 | 1,433 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace yukicoder_188
{
class Program
{
static void Main(string[] args)
{
int day = 0;
for (int m = 1; m <= 12; m++)
{
if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12)
{
for(int d = 1; d <= 31; d++)
{
if (m == d % 10 + d / 10)
{
day++;
}
}
}
else if(m == 2)
{
for (int d = 1; d <= 28; d++)
{
if (m == d % 10 + d / 10)
{
day++;
}
}
}
else
{
for (int d = 1; d <=30; d++)
{
if (m == d % 10 + d / 10)
{
day++;
}
}
}
}
Console.WriteLine(day);
Console.ReadLine();
}
}
}
kimny