結果

問題 No.219 巨大数の概算
ユーザー convexineqconvexineq
提出日時 2020-12-19 11:13:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 139 ms / 1,500 ms
コード長 348 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 81,624 KB
実行使用メモリ 77,252 KB
最終ジャッジ日時 2023-10-21 09:06:45
合計ジャッジ時間 8,403 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
77,252 KB
testcase_01 AC 122 ms
76,880 KB
testcase_02 AC 131 ms
76,880 KB
testcase_03 AC 116 ms
76,884 KB
testcase_04 AC 112 ms
76,836 KB
testcase_05 AC 34 ms
53,704 KB
testcase_06 AC 71 ms
72,648 KB
testcase_07 AC 35 ms
53,704 KB
testcase_08 AC 70 ms
72,648 KB
testcase_09 AC 35 ms
53,704 KB
testcase_10 AC 124 ms
77,252 KB
testcase_11 AC 130 ms
77,252 KB
testcase_12 AC 123 ms
76,884 KB
testcase_13 AC 126 ms
77,252 KB
testcase_14 AC 119 ms
76,884 KB
testcase_15 AC 118 ms
76,884 KB
testcase_16 AC 123 ms
77,252 KB
testcase_17 AC 121 ms
76,880 KB
testcase_18 AC 131 ms
77,248 KB
testcase_19 AC 120 ms
76,880 KB
testcase_20 AC 120 ms
76,880 KB
testcase_21 AC 139 ms
76,880 KB
testcase_22 AC 137 ms
77,252 KB
testcase_23 AC 129 ms
76,884 KB
testcase_24 AC 134 ms
76,880 KB
testcase_25 AC 124 ms
77,252 KB
testcase_26 AC 128 ms
77,252 KB
testcase_27 AC 118 ms
76,880 KB
testcase_28 AC 123 ms
76,880 KB
testcase_29 AC 124 ms
76,884 KB
testcase_30 AC 131 ms
77,248 KB
testcase_31 AC 119 ms
76,880 KB
testcase_32 AC 121 ms
77,248 KB
testcase_33 AC 118 ms
76,884 KB
testcase_34 AC 119 ms
76,884 KB
testcase_35 AC 117 ms
76,884 KB
testcase_36 AC 123 ms
76,876 KB
testcase_37 AC 125 ms
76,884 KB
testcase_38 AC 121 ms
76,880 KB
testcase_39 AC 120 ms
76,884 KB
testcase_40 AC 121 ms
76,884 KB
testcase_41 AC 120 ms
76,884 KB
testcase_42 AC 125 ms
77,248 KB
testcase_43 AC 128 ms
77,252 KB
testcase_44 AC 129 ms
77,252 KB
testcase_45 AC 129 ms
76,876 KB
testcase_46 AC 123 ms
76,880 KB
testcase_47 AC 124 ms
76,892 KB
testcase_48 AC 121 ms
76,880 KB
testcase_49 AC 122 ms
76,884 KB
testcase_50 AC 124 ms
76,884 KB
testcase_51 AC 37 ms
53,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
from math import log
from bisect import bisect_left
res = [-1.0] + [log(i/10,10) for i in range(1,101)]

for _ in range(n):
    a,b = map(int,input().split())
    c = b*log(a,10)
    z = int(c)
    idx = bisect_left(res, c-z) - 1
    if idx <= 9: idx = 10
    if idx >= 100: idx = 99
    x = idx//10
    y = idx%10
    print(x,y,z)
0