結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー yuppe19 😺
提出日時 2015-04-22 19:30:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 15 ms / 1,000 ms
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 69 ms
コンパイル使用メモリ 7,844 KB
最終ジャッジ日時 2025-12-03 14:44:04
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/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