結果

問題 No.2109 Special Week
ユーザー SI1000-githubSI1000-github
提出日時 2022-10-29 11:22:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 1,021 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 72,516 KB
最終ジャッジ日時 2023-09-20 16:07:56
合計ジャッジ時間 6,429 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
72,344 KB
testcase_01 AC 105 ms
72,288 KB
testcase_02 AC 106 ms
72,388 KB
testcase_03 AC 107 ms
72,236 KB
testcase_04 AC 106 ms
72,388 KB
testcase_05 AC 106 ms
72,192 KB
testcase_06 AC 104 ms
72,320 KB
testcase_07 AC 104 ms
72,388 KB
testcase_08 AC 106 ms
72,396 KB
testcase_09 AC 105 ms
72,356 KB
testcase_10 AC 106 ms
72,504 KB
testcase_11 AC 107 ms
72,380 KB
testcase_12 AC 107 ms
72,096 KB
testcase_13 AC 106 ms
72,144 KB
testcase_14 AC 106 ms
72,228 KB
testcase_15 AC 105 ms
72,308 KB
testcase_16 AC 106 ms
72,256 KB
testcase_17 AC 106 ms
72,144 KB
testcase_18 AC 105 ms
72,516 KB
testcase_19 AC 107 ms
72,232 KB
testcase_20 AC 107 ms
72,132 KB
testcase_21 AC 107 ms
72,476 KB
testcase_22 AC 107 ms
72,232 KB
testcase_23 AC 106 ms
72,388 KB
testcase_24 AC 105 ms
72,280 KB
testcase_25 AC 105 ms
72,460 KB
testcase_26 AC 105 ms
72,300 KB
testcase_27 AC 106 ms
72,320 KB
testcase_28 AC 105 ms
72,232 KB
testcase_29 AC 106 ms
72,412 KB
testcase_30 AC 107 ms
72,384 KB
testcase_31 AC 106 ms
72,396 KB
testcase_32 AC 106 ms
72,256 KB
testcase_33 AC 105 ms
72,320 KB
testcase_34 AC 107 ms
72,236 KB
testcase_35 AC 105 ms
72,232 KB
testcase_36 AC 104 ms
72,328 KB
testcase_37 AC 106 ms
72,256 KB
testcase_38 AC 103 ms
72,256 KB
testcase_39 AC 110 ms
72,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
# -*- coding: utf-8 -*-

# import
from sys import stdin, setrecursionlimit
setrecursionlimit(10**8)

def int_map():
    return map(int,input().split())

def int_list():
    return list(map(int,input().split()))

def int_mtx(N):
    x = [list(map(int, stdin.readline().split())) for _ in range(N)]
    return x

def str_mtx(N):
    x = [list(stdin.readline()[:-1]) for _ in range(N)]
    return x

def print_space(l):
    return print(" ".join([str(x) for x in l]))



"""    main code    """

import datetime as dt

date = dt.datetime(2017, 1, 1, 0, 0)

dates = []

for i in range(365):
    dates.append(f"{str(date)[5:7]}{str(date)[8:10]}")
    date += dt.timedelta(days=1)

M,D,K = int_map()

for i in range(365):
    if str(M).zfill(2)+str(D).zfill(2) == dates[i]:
        s = set()
        for j in range(7):
            ss = dates[(i+j)%365]
            for ssi in ss:
                s.add(ssi)
        
        if len(s) >= K:
            print('Yes')
            exit()
            
print("No")
0