Logo
(追記) (追記ここまで)

31386번 - History 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB54480.000%

문제

Android Vasya likes the history of the ancient world. He likes to read about various superstitions people had at that time.

Recently Vasya came across a superstition concerning his favorite number 13. It turned out, that ancient people considered this number unlucky and avoided it as much as they could:

  • they wouldn't sit at table if there were exactly 13 people;
  • they didn't use number 13 in numbering floors of a building: 12-th floor was followed by 14-th one;
  • they didn't do anything important on Friday the 13-th.

Vasya was especially amused by the superstition about Friday. How could people think that something bad could happen in such a wonderful day like Friday?

Now Vasya makes a research in the ancient world history covering a period from year $A$ till year $B$. He wonders how many unlucky Fridays this period contains. Help him to cope with this simple task.

입력

The only line contains integers $A$ and $B$ (1919ドル \leq A \leq B \leq 10^9$). Androids use the Gregorian style for chronology. According to it the year is leap if its number is a multiple of 400 or if it is a multiple of 4 but is not a multiple of 100. In the leap years February is extended to 29 days.

출력

For every $k$ from 0 to 12 output how many times in the period from Vasya's research there was a year with exactly $k$ unlucky Fridays.

제한

예제 입력 1

2015 2016

예제 출력 1

0: 0
1: 1
2: 0
3: 1
4: 0
5: 0
6: 0
7: 0
8: 0
9: 0
10: 0
11: 0
12: 0

노트

In 2015 Fridays are February 13, March 13 and November 13, and in 2016 is May 13 only.

출처

Contest > Open Cup > 2014/2015 Season > Stage 14: Grand Prix of East and West C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /