Please sign in first.
Submission #236895
Source Code Expand
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program {
static int[] ReadInts() {
return Console.ReadLine().Split(' ').Select((e => int.Parse(e))).ToArray();
}
static void Main(string[] args) {
var ab = ReadInts();
var a = ab[0];
var b = ab[1];
if (a % 4 != 0) { a += 4 - a % 4; }
b -= b % 4;
var y4 = (b - a) / 4 + 1;
if (a % 100 != 0) { a += 100 - a % 100; }
b -= b % 100;
var y100 = (b - a) / 100 + 1;
if (a % 400 != 0) { a += 400 - a % 400; }
b -= b % 400;
var y400 = (b - a) / 400+1;
Console.WriteLine(y4 - y100 + y400);
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - 2月29日 |
| User | BlackLemon |
| Language | C# (Mono 2.10.8.1) |
| Score | 100 |
| Code Size | 750 Byte |
| Status | AC |
| Exec Time | 177 ms |
| Memory | 9012 KiB |
Judge Result
| Set Name | sub | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 25 / 25 | 75 / 75 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| sub | test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_07A.txt, test_09A.txt, test_11A.txt, test_13A.txt, test_15A.txt |
| All | test_01A.txt, test_02A.txt, test_03A.txt, test_04A.txt, test_05A.txt, test_06.txt, test_07A.txt, test_08.txt, test_09A.txt, test_10.txt, test_11A.txt, test_12.txt, test_13A.txt, test_14.txt, test_15A.txt, test_16.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample_01.txt | AC | 155 ms | 8944 KiB |
| sample_02.txt | AC | 161 ms | 8924 KiB |
| sample_03.txt | AC | 171 ms | 8972 KiB |
| test_01A.txt | AC | 177 ms | 8940 KiB |
| test_02A.txt | AC | 156 ms | 8904 KiB |
| test_03A.txt | AC | 176 ms | 8912 KiB |
| test_04A.txt | AC | 163 ms | 8936 KiB |
| test_05A.txt | AC | 161 ms | 8960 KiB |
| test_06.txt | AC | 162 ms | 8872 KiB |
| test_07A.txt | AC | 161 ms | 8940 KiB |
| test_08.txt | AC | 156 ms | 8896 KiB |
| test_09A.txt | AC | 159 ms | 8960 KiB |
| test_10.txt | AC | 161 ms | 8924 KiB |
| test_11A.txt | AC | 156 ms | 8892 KiB |
| test_12.txt | AC | 168 ms | 8944 KiB |
| test_13A.txt | AC | 164 ms | 8928 KiB |
| test_14.txt | AC | 169 ms | 9012 KiB |
| test_15A.txt | AC | 163 ms | 8980 KiB |
| test_16.txt | AC | 162 ms | 8936 KiB |