結果

問題 No.2109 Special Week
ユーザー titan23titan23
提出日時 2022-10-28 21:25:04
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 976 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 75,076 KB
最終ジャッジ日時 2023-09-20 04:05:38
合計ジャッジ時間 7,001 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
74,736 KB
testcase_01 AC 132 ms
74,848 KB
testcase_02 AC 135 ms
74,708 KB
testcase_03 AC 133 ms
74,576 KB
testcase_04 AC 129 ms
74,640 KB
testcase_05 AC 127 ms
74,756 KB
testcase_06 AC 130 ms
74,572 KB
testcase_07 AC 130 ms
74,792 KB
testcase_08 AC 129 ms
75,068 KB
testcase_09 AC 127 ms
74,904 KB
testcase_10 AC 129 ms
75,076 KB
testcase_11 AC 128 ms
74,764 KB
testcase_12 AC 128 ms
74,848 KB
testcase_13 AC 129 ms
74,720 KB
testcase_14 AC 127 ms
74,548 KB
testcase_15 AC 127 ms
74,552 KB
testcase_16 AC 130 ms
75,032 KB
testcase_17 AC 128 ms
74,944 KB
testcase_18 AC 128 ms
74,808 KB
testcase_19 AC 128 ms
75,044 KB
testcase_20 AC 131 ms
74,572 KB
testcase_21 AC 127 ms
74,844 KB
testcase_22 AC 131 ms
74,924 KB
testcase_23 AC 129 ms
74,872 KB
testcase_24 AC 128 ms
74,736 KB
testcase_25 AC 127 ms
74,876 KB
testcase_26 AC 129 ms
74,720 KB
testcase_27 AC 127 ms
74,748 KB
testcase_28 AC 128 ms
74,904 KB
testcase_29 AC 129 ms
74,816 KB
testcase_30 AC 128 ms
74,928 KB
testcase_31 AC 126 ms
75,036 KB
testcase_32 AC 130 ms
74,748 KB
testcase_33 AC 132 ms
74,848 KB
testcase_34 AC 126 ms
74,832 KB
testcase_35 AC 130 ms
74,784 KB
testcase_36 AC 129 ms
74,540 KB
testcase_37 AC 127 ms
74,696 KB
testcase_38 AC 129 ms
74,832 KB
testcase_39 AC 128 ms
74,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
import math, random
from bisect import bisect_right, bisect_left
from itertools import product, permutations, combinations, combinations_with_replacement 
from collections import deque, defaultdict, Counter
from heapq import heapify, heappush, heappop
from functools import lru_cache, reduce
inf = float('inf')
def error(*args, sep=' ', end='\n'):
  print(*args, sep=sep, end=end, file=sys.stderr)
def ltos(a, f=str, sep=' '):
  return sep.join(map(f, a))
# mod = 1000000007
# mod = 998244353
# sys.setrecursionlimit(10**6)

#  -----------------------  #


m, d, k = map(int, input().split())

a = []
for i in range(7):
  s = f'{str(m).zfill(2)}{str(d).zfill(2)}'
  a.extend(list(s))
  d += 1
  if m in {4,6,9,11}:
    if d == 31:
      m += 1
      d = 1
  elif m == 2:
    if d == 29:
      m += 1
      d = 1
  else:
    if d == 32:
      m += 1
      d = 1
  m %= 12
a = set(a)
print('Yes' if len(a) >= k else 'No')
0