Submission #19406491


Source Code Expand

Copy
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n-1; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 1e9
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
#define P pair<ll, ll>

using namespace std;
typedef long long ll;
typedef vector<ll> Vec;
typedef vector<vector<ll>> Mat;

int dy[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dx[] = {1, -1, 0, 0, 1, -1, 1, -1};

int main()
{
  ll A, B;
  cin >> A >> B;
  A--;
  ll cntA = A / 4 - A / 100 + A / 400;
  ll cntB = B / 4 - B / 100 + B / 400;
  cout << cntB - cntA << endl;
  return 0;
}

Submission Info

Submission Time
Task C - 2月29日
User akimotty
Language C++ (GCC 9.2.1)
Score 100
Code Size 646 Byte
Status AC
Exec Time 6 ms
Memory 3588 KB

Judge Result

Set Name sub All
Score / Max Score 25 / 25 75 / 75
Status
AC × 10
AC × 22
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 sample_01.txt, sample_02.txt, sample_03.txt, 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 6 ms 3416 KB
sample_02.txt AC 2 ms 3404 KB
sample_03.txt AC 2 ms 3444 KB
test_01A.txt AC 2 ms 3332 KB
test_02A.txt AC 2 ms 3380 KB
test_03A.txt AC 2 ms 3488 KB
test_04A.txt AC 3 ms 3412 KB
test_05A.txt AC 2 ms 3588 KB
test_06.txt AC 4 ms 3336 KB
test_07A.txt AC 2 ms 3432 KB
test_08.txt AC 2 ms 3412 KB
test_09A.txt AC 2 ms 3488 KB
test_10.txt AC 4 ms 3436 KB
test_11A.txt AC 2 ms 3380 KB
test_12.txt AC 2 ms 3584 KB
test_13A.txt AC 2 ms 3444 KB
test_14.txt AC 2 ms 3412 KB
test_15A.txt AC 2 ms 3400 KB
test_16.txt AC 2 ms 3480 KB