結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-11 14:39:38 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 1,000 ms |
| コード長 | 713 bytes |
| コンパイル時間 | 978 ms |
| コンパイル使用メモリ | 108,036 KB |
| 実行使用メモリ | 22,196 KB |
| 最終ジャッジ日時 | 2025-11-11 14:39:40 |
| 合計ジャッジ時間 | 1,660 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
public class Program
{
public static void Main()
{
int happyDay = 0; //カウント
for (int i = 0; i < 365; i++)
{
DateTime addDay = new DateTime(2015, 1, 1).AddDays(i);
int ten = 0;
int one = 0;
if(addDay.Day < 10)
{
one = addDay.Day;
}
else
{
ten = addDay.Day / 10;
one = addDay.Day % (ten * 10);
}
int num = ten + one;
if (addDay.Month == num)
{
happyDay++;
continue;
}
}
Console.WriteLine("{0}", happyDay);
}
}