Submission #171588


Source Code Expand

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

class Program {
	static void Main(string[] args) {
		new Program().solve();
	}

	Action<Object> PUTS = str => Console.WriteLine(str);
	Action<int[,]> LIST = (array2D) => {
		for (int i = 0; i < array2D.GetLength(0); i++) {
			for (int j = 0; j < array2D.GetLength(1); j++) Console.Write("{0,-3} ", array2D[i, j]);
			Console.WriteLine();
		}
	};
	Action<int, Action<int>> REP = (n, action) => { for (int i = 0; i < n; i++) action(i); };
	Action<int, int, Action<int>> FOR = (a, b, action) => { for (int i = a; i < b; i++) action(i); };
	Action<int, int, Action<int, int>> NEST = (row, col, action) => {
		for (int i = 0; i < row; i++) for (int j = 0; j < col; j++) action(i, j);
	};

	public void solve() {

		Scanner cin = new Scanner();
		int y = cin.nextInt();
		int m = cin.nextInt();
		int d = cin.nextInt();

		if (m == 1) {
			m = 13;
			y--;
		} else if (m == 2) {
			m = 14;
			y--;
		}

		int a = (int)(365 * 2014 + Math.Floor(2014 / 4.0) - Math.Floor(2014.0 / 100) + Math.Floor(2014.0 / 400) + Math.Floor(306.0 * 6 / 10) + 17 - 429);

		int b = (int)(365 * y + Math.Floor(y / 4.0) - Math.Floor(y / 100.0) + Math.Floor(y / 400.0) + Math.Floor(306.0 * (m + 1) / 10) + d - 429);

		PUTS(a - b);
	}

}


class Scanner {
	string[] s;
	int i;
	char[] cs = new char[] { ' ' };

	public Scanner() {
		s = new string[0];
		i = 0;
	}

	public string next() {
		if (i < s.Length) return s[i++];
		s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
		i = 0;
		return s[i++];
	}

	public int nextInt() {
		return int.Parse(next());
	}

	public long nextLong() {
		return long.Parse(next());
	}
}

Submission Info

Submission Time
Task A - 経過日数
User parfait
Language C# (Mono 2.10.8.1)
Score 100
Code Size 1756 Byte
Status AC
Exec Time 148 ms
Memory 7948 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 24
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 143 ms 7784 KB
subtask0_sample02.txt AC 139 ms 7784 KB
subtask0_sample03.txt AC 141 ms 7716 KB
subtask0_sample04.txt AC 136 ms 7816 KB
subtask1_01.txt AC 134 ms 7784 KB
subtask1_02.txt AC 137 ms 7784 KB
subtask1_03.txt AC 141 ms 7788 KB
subtask1_04.txt AC 141 ms 7780 KB
subtask1_05.txt AC 140 ms 7948 KB
subtask1_06.txt AC 142 ms 7784 KB
subtask1_07.txt AC 138 ms 7788 KB
subtask1_08.txt AC 144 ms 7788 KB
subtask1_09.txt AC 137 ms 7784 KB
subtask1_10.txt AC 141 ms 7848 KB
subtask1_11.txt AC 143 ms 7780 KB
subtask1_12.txt AC 138 ms 7784 KB
subtask1_13.txt AC 148 ms 7792 KB
subtask1_14.txt AC 143 ms 7788 KB
subtask1_15.txt AC 140 ms 7792 KB
subtask1_16.txt AC 136 ms 7784 KB
subtask1_17.txt AC 144 ms 7792 KB
subtask1_18.txt AC 138 ms 7796 KB
subtask1_19.txt AC 134 ms 7792 KB
subtask1_20.txt AC 139 ms 7792 KB