結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー yuppe19 😺
提出日時 2015-04-22 19:30:35
言語 Python2
(2.7.18)
コンパイル:
python2x -m py_compile _filename_
実行:
/usr/bin/python2x Main.pyc
結果
AC  
実行時間 8 ms / 1,000 ms
+ 966µs
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 12 ms
コンパイル使用メモリ 9,328 KB
実行使用メモリ 7,040 KB
最終ジャッジ日時 2026-07-17 13:18:46
合計ジャッジ時間 981 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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