結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-22 19:30:35 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 1,000 ms |
| コード長 | 366 bytes |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,784 KB |
| 最終ジャッジ日時 | 2024-12-30 20:09:58 |
| 合計ジャッジ時間 | 491 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#!/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))))