結果

問題 No.8083 12歳
ユーザー さかぽん
提出日時 2021-04-02 10:56:09
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 555 bytes
コンパイル時間 2,851 ms
コンパイル使用メモリ 113,772 KB
実行使用メモリ 28,220 KB
最終ジャッジ日時 2024-12-23 03:51:09
合計ジャッジ時間 21,866 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 254 WA * 112
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class K
{
	static int[] Read() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	static (int, int, int) Read3() { var a = Read(); return (a[0], a[1], a[2]); }
	static void Main() => Console.WriteLine(Solve());
	static object Solve()
	{
		var (y, n, d) = Read3();

		var all = IsLeapYear(y + 1) ? 366 : 365;
		var min = Math.Max(0, n - d);
		var max = Math.Min(n, all - d);
		return $"{min} {max}";
	}

	static bool IsLeapYear(int y)
	{
		if (y % 400 == 0) return true;
		if (y % 100 == 0) return false;
		return y % 4 == 0;
	}
}
0