結果

問題 No.740 幻の木
ユーザー uran110uran110
提出日時 2019-02-15 14:50:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-10-12 16:19:57
合計ジャッジ時間 1,062 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,940 KB
testcase_01 AC 16 ms
7,764 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 15 ms
7,872 KB
testcase_04 AC 15 ms
7,820 KB
testcase_05 AC 15 ms
7,844 KB
testcase_06 AC 15 ms
7,832 KB
testcase_07 AC 16 ms
7,760 KB
testcase_08 AC 15 ms
7,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,P,Q=map(int,input().split())
l_y=2*M*Q+M*(12-Q)
ans=(N//l_y)*12
l=N%l_y
for m in range(1,13):
	ans+=1
	if P<=m and m<(P+Q):l-=2*M
	else:l-=M
	if l<=0:break
print(ans)
0