提出 #2462833


ソースコード 拡げる

#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;
}

提出情報

提出日時
問題 A - Day of Takahashi
ユーザ pauljgblt
言語 C++14 (GCC 5.4.1)
得点 100
コード長 429 Byte
結果 AC
実行時間 1 ms
メモリ 256 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 7
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
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