結果

問題 No.51 やる気の問題
ユーザー 双六双六
提出日時 2020-07-22 10:24:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 399 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 86,976 KB
実行使用メモリ 77,432 KB
最終ジャッジ日時 2023-09-01 22:02:23
合計ジャッジ時間 4,754 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
72,724 KB
testcase_01 AC 112 ms
72,864 KB
testcase_02 AC 111 ms
72,564 KB
testcase_03 AC 115 ms
77,232 KB
testcase_04 AC 115 ms
77,140 KB
testcase_05 AC 117 ms
77,056 KB
testcase_06 AC 116 ms
77,236 KB
testcase_07 AC 115 ms
77,124 KB
testcase_08 AC 115 ms
77,240 KB
testcase_09 AC 116 ms
77,160 KB
testcase_10 AC 114 ms
77,384 KB
testcase_11 AC 115 ms
77,248 KB
testcase_12 AC 114 ms
77,264 KB
testcase_13 AC 114 ms
77,320 KB
testcase_14 AC 114 ms
77,240 KB
testcase_15 AC 115 ms
77,240 KB
testcase_16 AC 114 ms
77,164 KB
testcase_17 AC 118 ms
77,292 KB
testcase_18 AC 117 ms
77,164 KB
testcase_19 AC 113 ms
77,160 KB
testcase_20 AC 115 ms
77,432 KB
testcase_21 AC 116 ms
77,240 KB
testcase_22 AC 120 ms
77,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
import copy

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	W = int(input())
	D = int(input())
	for i in range(D - 1):
		W -= int(W // ((D - i) ** 2))
		# print(W)

	print(W)

if __name__ == '__main__':
	main()
0