Submission #171586


Source Code Expand

Copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class A
    {
        static void Main(string[] args)
        {
            int y = int.Parse(Console.ReadLine());
            int m = int.Parse(Console.ReadLine());
            int d = int.Parse(Console.ReadLine());

            int day1 = calc(y, m, d);
            int day2 = calc(2014, 5, 17);
            Console.WriteLine(day2 - day1);
            Console.ReadLine();

        }

        public static int calc(int y, int m, int d)
        {
            if (m <= 2)
            {
                m += 12;
            }

            int ans = 365 * y;
            ans += (int)Math.Floor((double)y / 4.0);
            ans -= (int)Math.Floor((double)y / 100.0);
            ans += (int)Math.Floor((double)y / 400.0);
            ans += (int)Math.Floor((306.0 * (double)(m + 1) / 10.0));
            ans += d;
            ans -= 429;
            return ans;
        
        }
    }
}

Submission Info

Submission Time
Task A - 経過日数
User moheiji
Language C# (Mono 2.10.8.1)
Score 0
Code Size 1051 Byte
Status WA
Exec Time 147 ms
Memory 7928 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
AC × 2
WA × 2
AC × 19
WA × 5
Set Name Test Cases
Sample subtask0_sample01.txt, subtask0_sample02.txt, subtask0_sample03.txt, subtask0_sample04.txt
All subtask0_sample01.txt, subtask0_sample02.txt, subtask0_sample03.txt, subtask0_sample04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask1_20.txt
Case Name Status Exec Time Memory
subtask0_sample01.txt AC 139 ms 7796 KB
subtask0_sample02.txt WA 143 ms 7788 KB
subtask0_sample03.txt AC 144 ms 7800 KB
subtask0_sample04.txt WA 141 ms 7800 KB
subtask1_01.txt AC 140 ms 7804 KB
subtask1_02.txt AC 140 ms 7816 KB
subtask1_03.txt WA 140 ms 7800 KB
subtask1_04.txt AC 145 ms 7792 KB
subtask1_05.txt AC 146 ms 7800 KB
subtask1_06.txt AC 140 ms 7804 KB
subtask1_07.txt WA 142 ms 7804 KB
subtask1_08.txt AC 137 ms 7796 KB
subtask1_09.txt AC 139 ms 7800 KB
subtask1_10.txt AC 141 ms 7812 KB
subtask1_11.txt AC 140 ms 7804 KB
subtask1_12.txt AC 137 ms 7928 KB
subtask1_13.txt AC 147 ms 7788 KB
subtask1_14.txt AC 140 ms 7804 KB
subtask1_15.txt AC 133 ms 7804 KB
subtask1_16.txt AC 138 ms 7792 KB
subtask1_17.txt AC 138 ms 7804 KB
subtask1_18.txt WA 140 ms 7796 KB
subtask1_19.txt AC 135 ms 7796 KB
subtask1_20.txt AC 138 ms 7796 KB