結果
問題 | No.188 HAPPY DAY |
ユーザー | 紙ぺーぱー |
提出日時 | 2015-04-18 00:47:29 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 549 bytes |
コンパイル時間 | 2,479 ms |
コンパイル使用メモリ | 105,084 KB |
実行使用メモリ | 21,372 KB |
最終ジャッジ日時 | 2023-08-29 01:42:29 |
合計ジャッジ時間 | 3,139 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; static public class Program { static public void Main() { readEOF(); var cnt = 0; for (var d = new DateTime(2015,1,1); d.Year<=2015; d=d.AddDays(1)) { if (d.Month == d.Day.ToString().Select(x => x - '0').Sum()) cnt++; } Console.WriteLine(cnt); } static void readEOF() { if (Console.In.Peek() >= 0) throw new Exception("invalid input too long input file"); } }