結果
問題 | No.1918 Simple Math ? |
ユーザー | とりゐ |
提出日時 | 2022-03-26 10:45:54 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 782 ms |
コンパイル使用メモリ | 87,236 KB |
実行使用メモリ | 81,268 KB |
最終ジャッジ日時 | 2023-09-11 11:30:52 |
合計ジャッジ時間 | 5,693 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 541 ms
81,268 KB |
testcase_01 | AC | 98 ms
76,800 KB |
testcase_02 | AC | 100 ms
76,636 KB |
testcase_03 | AC | 104 ms
76,444 KB |
testcase_04 | AC | 96 ms
76,764 KB |
testcase_05 | AC | 99 ms
76,452 KB |
testcase_06 | TLE | - |
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 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
ソースコード
def floor_sqrt(n): ng,ok=n+1,-1 while ng-ok>1: mid=(ok+ng)//2 if mid*mid<=n: ok=mid else: ng=mid return ok def solve(): a,n=map(int,input().split()) ans=0 for i in range(1,n+1): ans+=floor_sqrt(a*i) ans%=mod print(ans) mod=10**9+7 for _ in range(int(input())): solve()