結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー 大谷祐翔
提出日時 2025-11-10 16:21:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 21 ms / 1,000 ms
コード長 686 bytes
コンパイル時間 876 ms
コンパイル使用メモリ 110,060 KB
実行使用メモリ 24,088 KB
最終ジャッジ日時 2025-11-10 16:21:24
合計ジャッジ時間 1,685 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
class Program
{
    static void Main(string[] args)
    {
        int count = 0;
        for (int i = 1; i <= 12; i++)
        {
            for (int j = 1; j <= 31; j++)
            {
                if (j >= 10)
                {
                    int oneDigits = j / 10;
                    int twoDigits = j % 10;

                    int sum = oneDigits + twoDigits;

                    if (sum == i)
                    {
                        count++;
                    }
                }
                else if (i == j)
                {
                    count++;
                }
            }
        }

        Console.WriteLine(count - 1);
    }
}
0