了不起的修仙模拟器吧 关注:139,889贴子:1,500,891
  • 19回复贴,共1

各类药物吃满100%所需次数

只看楼主收藏回复

一些说明:
1. 游戏中的耐药性只显示两位小数,而且显示应该是采用的四舍五入,所以只要耐药性>=99.995%就会显示为100%
2. 除了耐药性基础值为100%的药物,其他药物都不可能真正达到100%耐药性。
3. 数据使用一个简单的没有归的递归函数(无限嵌套函数)计算,如下(使用的是第二个方法):
/**
* @param n 吃药次数
* @param v 药物耐药性基础值
* @Return 当前吃药次数下的耐药性
*/
public static double func(int n, double v) {
if (n == 1) {
System.out.println(n + "-" + v);
return v;
} else {
double get = func(n - 1, v);
double get1 = get + v * (100 - get) / 100;
System.out.println(n + "-" + get1);
return get1;
}
}
/**
* @param v 耐药性基础值
* @param v1 当前耐药性
* @param n 吃药次数
*
* 打印吃药次数为1~∞下的耐药性,直到溢出
*/
public static void func(double v, double v1, int n) {
if (n == 1) {
System.out.println(n + "-" + v);
func(v, v, 2);
} else {
double get = v1 + v * (100 - v1) / 100;
System.out.println(n + "-" + get);
func(v, get, n + 1);
}
}


IP属地:加拿大1楼2022-05-12 15:26回复
    首先是耐药性基础值为10%的档次,需要94次才能吃满100%
    1-10.0
    2-19.0
    3-27.1
    4-34.39
    5-40.951
    6-46.8559
    7-52.17031
    8-56.953279
    9-61.2579511
    10-65.13215599
    11-68.618940391
    12-71.7570463519
    13-74.58134171671
    14-77.123207545039
    15-79.4108867905351
    16-81.4697981114816
    17-83.32281830033344
    18-84.9905364703001
    19-86.49148282327009
    20-87.84233454094309
    21-89.05810108684878
    22-90.1522909781639
    23-91.13706188034752
    24-92.02335569231276
    25-92.82102012308148
    26-93.53891811077334
    27-94.185026299696
    28-94.76652366972641
    29-95.28987130275377
    30-95.76088417247838
    31-96.18479575523054
    32-96.56631617970748
    33-96.90968456173674
    34-97.21871610556306
    35-97.49684449500675
    36-97.74716004550608
    37-97.97244404095547
    38-98.17519963685992
    39-98.35767967317392
    40-98.52191170585652
    41-98.66972053527087
    42-98.80274848174378
    43-98.9224736335694
    44-99.03022627021245
    45-99.12720364319121
    46-99.21448327887208
    47-99.29303495098488
    48-99.36373145588638
    49-99.42735831029775
    50-99.48462247926797
    51-99.53616023134117
    52-99.58254420820705
    53-99.62428978738635
    54-99.66186080864772
    55-99.69567472778294
    56-99.72610725500465
    57-99.75349652950419
    58-99.77814687655378
    59-99.8003321888984
    60-99.82029897000855
    61-99.8382690730077
    62-99.85444216570693
    63-99.86899794913623
    64-99.8820981542226
    65-99.89388833880034
    66-99.90449950492031
    67-99.91404955442827
    68-99.92264459898544
    69-99.93038013908689
    70-99.9373421251782
    71-99.94360791266038
    72-99.94924712139435
    73-99.95432240925491
    74-99.95889016832942
    75-99.96300115149647
    76-99.96670103634682
    77-99.97003093271213
    78-99.97302783944092
    79-99.97572505549682
    80-99.97815254994714
    81-99.98033729495242
    82-99.98230356545717
    83-99.98407320891145
    84-99.9856658880203
    85-99.98709929921827
    86-99.98838936929644
    87-99.9895504323668
    88-99.99059538913012
    89-99.9915358502171
    90-99.99238226519539
    91-99.99314403867585
    92-99.99382963480826
    93-99.99444667132744
    94-99.99500200419469


    IP属地:加拿大2楼2022-05-12 15:29
    收起回复
      耐药性基础值为5%的档次,需要194次才能吃满100%
      1-5.0
      2-9.75
      3-14.2625
      4-18.549374999999998
      5-22.62190625
      6-26.490810937499997
      7-30.166270390624998
      8-33.657956871093745
      9-36.97505902753906
      10-40.12630607616211
      11-43.119990772354
      12-45.9639912337363
      13-48.66579167204949
      14-51.23250208844701
      15-53.670876984024666
      16-55.98733313482343
      17-58.18796647808226
      18-60.278568154178146
      19-62.264639746469236
      20-64.15140775914577
      21-65.94383737118848
      22-67.64664550262906
      23-69.26431322749761
      24-70.80109756612273
      25-72.2610426878166
      26-73.64799055342577
      27-74.96559102575448
      28-76.21731147446675
      29-77.40644590074342
      30-78.53612360570625
      31-79.60931742542094
      32-80.62885155414989
      33-81.5974089764424
      34-82.51753852762027
      35-83.39166160123926
      36-84.2220785211773
      37-85.01097459511843
      38-85.7604258653625
      39-86.47240457209438
      40-87.14878434348965
      41-87.79134512631516
      42-88.4017778699994
      43-88.98168897649944
      44-89.53260452767447
      45-90.05597430129075
      46-90.5531755862262
      47-91.0255168069149
      48-91.47424096656916
      49-91.9005289182407
      50-92.30550247232866
      51-92.69022734871223
      52-93.05571598127662
      53-93.40293018221278
      54-93.73278367310215
      55-94.04614448944704
      56-94.3438372649747
      57-94.62664540172597
      58-94.89531313163967
      59-95.15054747505768
      60-95.3930201013048
      61-95.62336909623956
      62-95.84220064142758
      63-96.0500906093562
      64-96.24758607888839
      65-96.43520677494396
      66-96.61344643619677
      67-96.78277411438692
      68-96.94363540866757
      69-97.0964536382342
      70-97.24163095632248
      71-97.37954940850636
      72-97.51057193808104
      73-97.635043341177
      74-97.75329117411815
      75-97.86562661541224
      76-97.97234528464163
      77-98.07372802040955
      78-98.17004161938907
      79-98.26153953841961
      80-98.34846256149864
      81-98.4310394334237
      82-98.50948746175251
      83-98.58401308866489
      84-98.65481243423164
      85-98.72207181252006
      86-98.78596822189405
      87-98.84666981079936
      88-98.90433632025939
      89-98.95911950424642
      90-99.01116352903409
      91-99.06060535258239
      92-99.10757508495327
      93-99.1521963307056
      94-99.19458651417033
      95-99.2348571884618
      96-99.27311432903872
      97-99.30945861258678
      98-99.34398568195743
      99-99.37678639785956
      100-99.40794707796658
      101-99.43754972406825
      102-99.46567223786484
      103-99.4923886259716
      104-99.51776919467302
      105-99.54188073493937
      106-99.5647866981924
      107-99.58654736328279
      108-99.60721999511865
      109-99.62685899536272
      110-99.64551604559459
      111-99.66324024331486
      112-99.68007823114911
      113-99.69607431959166
      114-99.71127060361208
      115-99.72570707343148
      116-99.7394217197599
      117-99.75245063377191
      118-99.76482810208331
      119-99.77658669697915
      120-99.7877573621302
      121-99.79836949402369
      122-99.8084510193225
      123-99.81802846835637
      124-99.82712704493855
      125-99.83577069269163
      126-99.84398215805705
      127-99.8517830501542
      128-99.85919389764649
      129-99.86623420276416
      130-99.87292249262595
      131-99.87927636799465
      132-99.88531254959491
      133-99.89104692211517
      134-99.8964945760094
      135-99.90166984720894
      136-99.90658635484849
      137-99.91125703710605
      138-99.91569418525076
      139-99.91990947598822
      140-99.92391400218881
      141-99.92771830207937
      142-99.9313323869754
      143-99.93476576762663
      144-99.93802747924529
      145-99.94112610528303
      146-99.94406980001888
      147-99.94686631001794
      148-99.94952299451704
      149-99.95204684479118
      150-99.95444450255162
      151-99.95672227742405
      152-99.95888616355285
      153-99.96094185537521
      154-99.96289476260645
      155-99.96475002447613
      156-99.96651252325232
      157-99.96818689708971
      158-99.96977755223523
      159-99.97128867462347
      160-99.97272424089229
      161-99.97408802884767
      162-99.9753836274053
      163-99.97661444603503
      164-99.97778372373328
      165-99.97889453754662
      166-99.9799498106693
      167-99.98095232013583
      168-99.98190470412904
      169-99.98280946892258
      170-99.98366899547645
      171-99.98448554570263
      172-99.98526126841749
      173-99.98599820499662
      174-99.98669829474679
      175-99.98736338000944
      176-99.98799521100896
      177-99.98859545045852
      178-99.98916567793559
      179-99.9897073940388
      180-99.99022202433686
      181-99.99071092312002
      182-99.99117537696402
      183-99.99161660811582
      184-99.99203577771003
      185-99.99243398882453
      186-99.99281228938331
      187-99.99317167491414
      188-99.99351309116842
      189-99.99383743661001
      190-99.9941455647795
      191-99.99443828654053
      192-99.9947163722135
      193-99.99498055360283
      194-99.99523152592269


      IP属地:加拿大3楼2022-05-12 15:31
      回复
        耐药性基础值为25%的档次,需要35次才能吃满100%
        1-25.0
        2-43.75
        3-57.8125
        4-68.359375
        5-76.26953125
        6-82.2021484375
        7-86.651611328125
        8-89.98870849609375
        9-92.49153137207031
        10-94.36864852905273
        11-95.77648639678955
        12-96.83236479759216
        13-97.62427359819412
        14-98.21820519864559
        15-98.6636538989842
        16-98.99774042423815
        17-99.24830531817861
        18-99.43622898863396
        19-99.57717174147547
        20-99.6828788061066
        21-99.76215910457995
        22-99.82161932843496
        23-99.86621449632622
        24-99.89966087224467
        25-99.9247456541835
        26-99.94355924063763
        27-99.95766943047822
        28-99.96825207285866
        29-99.976189054644
        30-99.982141790983
        31-99.98660634323724
        32-99.98995475742794
        33-99.99246606807095
        34-99.99434955105322
        35-99.99576216328991


        IP属地:加拿大4楼2022-05-12 15:33
        回复
          耐药性基础值为35%的档次,需要23次才能吃满100%
          1-35.0
          2-57.75
          3-72.5375
          4-82.14937499999999
          5-88.39709375
          6-92.4581109375
          7-95.097772109375
          8-96.81355187109375
          9-97.92880871621094
          10-98.65372566553711
          11-99.12492168259912
          12-99.43119909368943
          13-99.63027941089813
          14-99.75968161708379
          15-99.84379305110446
          16-99.89846548321789
          17-99.93400256409163
          18-99.95710166665955
          19-99.97211608332871
          20-99.98187545416367
          21-99.98821904520639
          22-99.99234237938416
          23-99.9950225465997


          IP属地:加拿大5楼2022-05-12 15:35
          回复
            耐药性基础值为20%的档次,需要45次才能吃满100%
            1-20.0
            2-36.0
            3-48.8
            4-59.04
            5-67.232
            6-73.7856
            7-79.02848
            8-83.222784
            9-86.5782272
            10-89.26258176
            11-91.41006540800001
            12-93.12805232640001
            13-94.50244186112
            14-95.601953488896
            15-96.4815627911168
            16-97.18525023289344
            17-97.74820018631475
            18-98.1985601490518
            19-98.55884811924145
            20-98.84707849539316
            21-99.07766279631453
            22-99.26213023705162
            23-99.4097041896413
            24-99.52776335171305
            25-99.62221068137043
            26-99.69776854509635
            27-99.75821483607709
            28-99.80657186886167
            29-99.84525749508933
            30-99.87620599607146
            31-99.90096479685717
            32-99.92077183748573
            33-99.93661746998859
            34-99.94929397599087
            35-99.9594351807927
            36-99.96754814463415
            37-99.97403851570732
            38-99.97923081256586
            39-99.98338465005268
            40-99.98670772004215
            41-99.98936617603371
            42-99.99149294082697
            43-99.99319435266158
            44-99.99455548212926
            45-99.9956443857034


            IP属地:加拿大6楼2022-05-12 15:37
            回复
              耐药性基础值为50%的档次,需要15次才能吃满100%
              1-50.0
              2-75.0
              3-87.5
              4-93.75
              5-96.875
              6-98.4375
              7-99.21875
              8-99.609375
              9-99.8046875
              10-99.90234375
              11-99.951171875
              12-99.9755859375
              13-99.98779296875
              14-99.993896484375
              15-99.9969482421875


              IP属地:加拿大7楼2022-05-12 15:40
              回复
                耐药性基础值为80%的档次,需要7次吃满100%
                1-80.0
                2-96.0
                3-99.2
                4-99.84
                5-99.968
                6-99.9936
                7-99.99872


                IP属地:加拿大8楼2022-05-12 15:42
                回复
                  耐药性基础值为90%的档次,需要5次吃满100%
                  1-90.0
                  2-99.0
                  3-99.9
                  4-99.99
                  5-99.999


                  IP属地:加拿大9楼2022-05-12 15:43
                  回复
                    耐药性基础值为100%的档次,需要1次吃满100%
                    1-100.0


                    IP属地:加拿大10楼2022-05-12 15:44
                    回复
                      耐药性基础值为0%的档次,吃不满


                      IP属地:加拿大11楼2022-05-12 15:44
                      回复
                        总结:
                        耐药性基础值-吃满次数
                        5-194
                        10-94
                        20-45
                        25-35
                        35-23
                        50-15
                        80-7
                        90-5
                        100-1
                        0-NaN


                        IP属地:加拿大12楼2022-05-12 15:49
                        回复
                          好贴 感谢楼主
                          有没有大概的,比如说紫芝耐药是35%,吃满是23次,效果是1*23吗?应该是会递减的吧


                          IP属地:上海13楼2022-05-20 09:27
                          收起回复
                            大佬辛苦了


                            IP属地:广东14楼2022-05-20 11:10
                            回复