結果

問題 No.87 Advent Calendar Problem
ユーザー 14番14番
提出日時 2016-04-10 04:11:58
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,696 bytes
コンパイル時間 892 ms
コンパイル使用メモリ 110,908 KB
実行使用メモリ 26,032 KB
最終ジャッジ日時 2024-04-14 23:39:17
合計ジャッジ時間 2,652 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 24 ms
25,672 KB
testcase_04 AC 24 ms
23,364 KB
testcase_05 AC 24 ms
23,852 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 24 ms
23,616 KB
testcase_18 AC 24 ms
26,032 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Text;

class Program
{
    public void Proc()
    {
        Reader.IsDebug = false;
        DateTime dt = new DateTime(2014, 7, 23);

        DayOfWeek wk = dt.DayOfWeek;
        int num = int.Parse(Reader.ReadLine());
        int ans = 0;
        for (int i = 2015; i <= num; i++)
        {
            DateTime tmpDt = new DateTime(i, 7, 23);
            if (wk == tmpDt.DayOfWeek)
            {
                ans++;
            }
        }
        Console.WriteLine(ans);
    }

    

    public class Reader
    {
        public static bool IsDebug = true;
        private static String PlainInput = @"


3000



 
";
        private static System.IO.StringReader Sr = null;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (Sr == null)
                {
                    Sr = new System.IO.StringReader(PlainInput.Trim());
                }
                return Sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        public static int[] GetInt(char delimiter = ' ', bool trim = false)
        {
            string inptStr = ReadLine();
            if (trim)
            {
                inptStr = inptStr.Trim();
            }
            string[] inpt = inptStr.Split(delimiter);
            int[] ret = new int[inpt.Length];
            for (int i = 0; i < inpt.Length; i++)
            {
                ret[i] = int.Parse(inpt[i]);
            }
            return ret;
        }
    }
    static void Main()
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0