結果
問題 | 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 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')