結果
問題 |
No.2624 Prediction by Average
|
ユーザー |
|
提出日時 | 2024-02-09 22:00:24 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,107 ms / 2,000 ms |
コード長 | 655 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 93,472 KB |
最終ジャッジ日時 | 2024-09-28 15:15:49 |
合計ジャッジ時間 | 5,090 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) input = sys.stdin.readline t = int(input()) #alist = list(map(int,input().split())) #alist = [] q = decimal.Decimal('0.001') for i in range(t): n,s = input().split() n = int(n) s = decimal.Decimal(s) ans = 0 for j in range(1,min(n+1,1000)): x = math.ceil(s*j) y = math.ceil((s+q)*j) #print(s,s+q,x,y,i,j) c = 0 for k in range(x,y): if 0 <= k <= 100*j: c = 1 ans += c print(ans + max(0,n-999))