結果

問題 No.188 HAPPY DAY
コンテスト
ユーザー Vin
提出日時 2022-11-09 17:03:34
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 541 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 713 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 35,068 KB
最終ジャッジ日時 2026-04-03 11:26:29
合計ジャッジ時間 8,746 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
import numpy as np
import calendar

def main():
    happy = 0
    
    m1 = [4,6,9,11] #30日
    
    for i in np.arange(1,13):
    	if i == 2:
    		for j in np.arange(1,29):
    			count(i, j)
    	elif i in m1:
    		for j in np.arange(1,31):
    			count(i, j)
    	else:
    		for j in np.arange(1,32):
    			count(i, j)
    		
    print(happy)
    			
def count(i, j):
	global happy
	sum = j//10 + j%10 #10の位と1の位を足す
	if i == sum:
		happy += 1
		
if __name__ == "__main__":
    main()
# your code goes here
0