結果

問題 No.1305 Speak of the Devil
ユーザー ch1channnch1channn
提出日時 2022-12-14 12:09:15
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 402 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 844,368 KB
最終ジャッジ日時 2024-04-25 16:27:06
合計ジャッジ時間 3,672 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')

p,q = map(int,input().split())
#pは1/pで来る
#qはq分後に確実に来る
dp = [0]*(q+1)
dp[q] = 1
for i in range(1,q+1):
	dp[i] += i/p +dp[i-1]
	if dp[i] >= 1:
		exit(print(min(p,q)))
		

		
0