結果
問題 |
No.1305 Speak of the Devil
|
ユーザー |
|
提出日時 | 2022-12-14 12:09:15 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 847,744 KB |
最終ジャッジ日時 | 2024-11-08 03:33:30 |
合計ジャッジ時間 | 3,690 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | MLE * 1 -- * 22 |
ソースコード
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)))