結果
| 問題 | 
                            No.188 HAPPY DAY
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-09-01 11:01:39 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 32 ms / 1,000 ms | 
| コード長 | 613 bytes | 
| コンパイル時間 | 342 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-11-18 08:49:22 | 
| 合計ジャッジ時間 | 546 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
ソースコード
list1=[2] #28 days
list2=[4,6,9,11] #30days
list3=[1,3,5,7,8,10,12] #31days
counter = 0
#各位の和を求める関数
def digitSum(n):
    s = str(n)
    array = list(map(int,s)) #1文字ずつ数値化して配列にする
    return sum(array)
for month in list1:
    for d in range(29):
        ds=digitSum(d)
        if month == ds :
            counter+=1
for month in list2:
    for d in range(31):
        ds=digitSum(d)
        if month == ds :
            counter+=1
for month in list3:
    for d in range(32):
        ds=digitSum(d)
        if month == ds :
            counter+=1
print(counter)