結果

問題 No.188 HAPPY DAY
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-22 19:30:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 14 ms / 1,000 ms
コード長 366 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 6,588 KB
実行使用メモリ 6,416 KB
最終ジャッジ日時 2023-08-29 01:54:15
合計ジャッジ時間 585 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from collections import namedtuple

def f(x):
    t, res = x, 0
    while t:
        t, m = divmod(t, 10)
        res += m
    return res

arr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
Date = namedtuple('Date', 'month, day')
print len(filter(lambda x: x.month == f(x.day), (Date(m+1, d+1) for m, ds in enumerate(arr) for d in xrange(ds))))
0