結果
問題 | No.2109 Special Week |
ユーザー |
|
提出日時 | 2022-10-28 21:25:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 976 bytes |
コンパイル時間 | 154 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 62,208 KB |
最終ジャッジ日時 | 2024-07-06 00:22:28 |
合計ジャッジ時間 | 3,501 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 |
ソースコード
import sysinput = lambda: sys.stdin.readline().rstrip()import math, randomfrom bisect import bisect_right, bisect_leftfrom itertools import product, permutations, combinations, combinations_with_replacementfrom collections import deque, defaultdict, Counterfrom heapq import heapify, heappush, heappopfrom functools import lru_cache, reduceinf = 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 += 1if m in {4,6,9,11}:if d == 31:m += 1d = 1elif m == 2:if d == 29:m += 1d = 1else:if d == 32:m += 1d = 1m %= 12a = set(a)print('Yes' if len(a) >= k else 'No')