Submission #2462833


Source Code Expand

#include <bits/stdc++.h>

using namespace std;

int dpm[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int main() {
  int aend, bend;
  cin >> aend >> bend;

  int result = 0;
  for (int a = 1; a <= aend; a++) {
    for (int b = 1; b <= dpm[a]; b++) {
      if (a==b) result++;
      if (a == aend && b == bend) {
        cout << result << endl;
        return 0;
      }
    }
  }
  return 0;
}

Submission Info

Submission Time
Task A - Day of Takahashi
User pauljgblt
Language C++14 (GCC 5.4.1)
Score 100
Code Size 429 Byte
Status AC
Exec Time 1 ms
Memory 256 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 7
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All in01.txt, in02.txt, in03.txt, in04.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
in01.txt AC 1 ms 256 KiB
in02.txt AC 1 ms 256 KiB
in03.txt AC 1 ms 256 KiB
in04.txt AC 1 ms 256 KiB
sample_01.txt AC 1 ms 256 KiB
sample_02.txt AC 1 ms 256 KiB
sample_03.txt AC 1 ms 256 KiB