How long does it take to type this?Lenient typing testPrint the fingering for the note on a saxophoneFind the Shortest Swype PathOutput optimal trill fingeringsProgram touch-tone instructions for my fingersWhat is the “Ant-Difficulty” of this string?Determine the “Luck” of a stringGenerate Menu Access KeysHow many times should I press this?Should this identifier be suggested?

Python: Add Submenu

Do Phineas and Ferb ever actually get busted in real time?

How old can references or sources in a thesis be?

Explain the parameters before and after @ in the terminal prompt

Do any Labour MPs support no-deal?

Why don't electromagnetic waves interact with each other?

TGV timetables / schedules?

What is the command to reset a PC without deleting any files

Is the month field really deprecated?

How is it possible to have an ability score that is less than 3?

Is it possible to do 50 km distance without any previous training?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)

declaring a variable twice in IIFE

Can I make popcorn with any corn?

Why don't electron-positron collisions release infinite energy?

Mathematical cryptic clues

Basic combinations logic doubt in probability

I probably found a bug with the sudo apt install function

Theorems that impeded progress

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

What do you call a Matrix-like slowdown and camera movement effect?

Shell script not opening as desktop application

How long does it take to type this?

Is there really no realistic way for a skeleton monster to move around without magic?



How long does it take to type this?


Lenient typing testPrint the fingering for the note on a saxophoneFind the Shortest Swype PathOutput optimal trill fingeringsProgram touch-tone instructions for my fingersWhat is the “Ant-Difficulty” of this string?Determine the “Luck” of a stringGenerate Menu Access KeysHow many times should I press this?Should this identifier be suggested?













6












$begingroup$


Introduction



I can type at a moderate pace, using the QWERTY keyboard layout. But if a word like yellowwooddoor has a ton of repeated letters, it takes a bit longer to type it. Even worse is when a word like "jump" has the same finger used for multiple different consecutive letters.



Here's how long it takes me to type letters on each finger (very unscientifically measured):



Columns are Finger name, keystrokes/second, seconds/keystroke, and the keys used by each finger



Typing same letter twice: 
L Pinky 5.2 0.1923076923 1qaz
L Ring 5 0.2 2wsx
L Mid 5.3 0.1886792453 3edc
L Index 5.5 0.1818181818 4rfv5tgb
R Thumb 6.5 0.1538461538 [space]
R Index 6.9 0.1449275362 6yhn7ujm
R Mid 6.3 0.1587301587 8ik,
R Ring 6.2 0.1612903226 9ol.
R Pinky 6.1 0.1639344262 0p;'

Typing different letter on same finger:
L Pinky 4.6 0.2173913043
L Ring 4.6 0.2173913043
L Mid 4.5 0.2222222222
L Index 5.3 0.1886792453
R Index 5.4 0.1851851852
R Mid 5.1 0.1960784314
R Ring 5.2 0.1923076923
R Pinky 5.2 0.1923076923


Same data in CSV format.



It takes



.75 * (first_finger_same_letter_time + second_finger_same_letter_time) / 2


time to switch between two fingers.



Challenge



Given a string as input, how long does it take to type it?



  • The "timer" starts the moment the first key is pressed and ends when the last key is pressed. You are just counting the time between keypresses.

  • This is code-golf. Shortest answer in bytes wins.

  • Submission can be either a complete program or function.

  • Input and output any way you want it, stdin/out, function params, file, doesn't matter.

  • Output should be accurate to at least 3 decimal places (+/- 0.001 for rounding error is fine). Leading 0. for numbers under 1 and trailing newline optional.

  • Input will be a string that contains (lowercase) a-z, 0-9, space, semicolon, comma, period, and apostrophe.

  • I always type spaces with my right thumb.

  • I use the normal touch typing fingers (you can also look at the above table for finger-key mappings).

  • Reference code used to generate test cases

Test cases



(empty string or any one-character string) - 0.000



aa - 0.192



fff - 0.364



fj - 0.123



the quick brown fox jumped over the lazy dog - 5.795



yellowwooddoor - 1.983



orangewooddoor - 1.841



jump on it, jump on it - 2.748



type on it, type on it - 2.549



abcdefghijklmnopqrstuvwxyz01234567890 ;,.' - 5.746



ok, this may not be the most accurate but it's in the ballpark, maybe within 30 percent or so. - 12.138










share|improve this question











$endgroup$











  • $begingroup$
    Are you sure you use the QUERTY keyboard, not the QWERTY one?
    $endgroup$
    – Embodiment of Ignorance
    3 hours ago










  • $begingroup$
    @EmbodimentofIgnorance oops.
    $endgroup$
    – Daniel M.
    3 hours ago















6












$begingroup$


Introduction



I can type at a moderate pace, using the QWERTY keyboard layout. But if a word like yellowwooddoor has a ton of repeated letters, it takes a bit longer to type it. Even worse is when a word like "jump" has the same finger used for multiple different consecutive letters.



Here's how long it takes me to type letters on each finger (very unscientifically measured):



Columns are Finger name, keystrokes/second, seconds/keystroke, and the keys used by each finger



Typing same letter twice: 
L Pinky 5.2 0.1923076923 1qaz
L Ring 5 0.2 2wsx
L Mid 5.3 0.1886792453 3edc
L Index 5.5 0.1818181818 4rfv5tgb
R Thumb 6.5 0.1538461538 [space]
R Index 6.9 0.1449275362 6yhn7ujm
R Mid 6.3 0.1587301587 8ik,
R Ring 6.2 0.1612903226 9ol.
R Pinky 6.1 0.1639344262 0p;'

Typing different letter on same finger:
L Pinky 4.6 0.2173913043
L Ring 4.6 0.2173913043
L Mid 4.5 0.2222222222
L Index 5.3 0.1886792453
R Index 5.4 0.1851851852
R Mid 5.1 0.1960784314
R Ring 5.2 0.1923076923
R Pinky 5.2 0.1923076923


Same data in CSV format.



It takes



.75 * (first_finger_same_letter_time + second_finger_same_letter_time) / 2


time to switch between two fingers.



Challenge



Given a string as input, how long does it take to type it?



  • The "timer" starts the moment the first key is pressed and ends when the last key is pressed. You are just counting the time between keypresses.

  • This is code-golf. Shortest answer in bytes wins.

  • Submission can be either a complete program or function.

  • Input and output any way you want it, stdin/out, function params, file, doesn't matter.

  • Output should be accurate to at least 3 decimal places (+/- 0.001 for rounding error is fine). Leading 0. for numbers under 1 and trailing newline optional.

  • Input will be a string that contains (lowercase) a-z, 0-9, space, semicolon, comma, period, and apostrophe.

  • I always type spaces with my right thumb.

  • I use the normal touch typing fingers (you can also look at the above table for finger-key mappings).

  • Reference code used to generate test cases

Test cases



(empty string or any one-character string) - 0.000



aa - 0.192



fff - 0.364



fj - 0.123



the quick brown fox jumped over the lazy dog - 5.795



yellowwooddoor - 1.983



orangewooddoor - 1.841



jump on it, jump on it - 2.748



type on it, type on it - 2.549



abcdefghijklmnopqrstuvwxyz01234567890 ;,.' - 5.746



ok, this may not be the most accurate but it's in the ballpark, maybe within 30 percent or so. - 12.138










share|improve this question











$endgroup$











  • $begingroup$
    Are you sure you use the QUERTY keyboard, not the QWERTY one?
    $endgroup$
    – Embodiment of Ignorance
    3 hours ago










  • $begingroup$
    @EmbodimentofIgnorance oops.
    $endgroup$
    – Daniel M.
    3 hours ago













6












6








6





$begingroup$


Introduction



I can type at a moderate pace, using the QWERTY keyboard layout. But if a word like yellowwooddoor has a ton of repeated letters, it takes a bit longer to type it. Even worse is when a word like "jump" has the same finger used for multiple different consecutive letters.



Here's how long it takes me to type letters on each finger (very unscientifically measured):



Columns are Finger name, keystrokes/second, seconds/keystroke, and the keys used by each finger



Typing same letter twice: 
L Pinky 5.2 0.1923076923 1qaz
L Ring 5 0.2 2wsx
L Mid 5.3 0.1886792453 3edc
L Index 5.5 0.1818181818 4rfv5tgb
R Thumb 6.5 0.1538461538 [space]
R Index 6.9 0.1449275362 6yhn7ujm
R Mid 6.3 0.1587301587 8ik,
R Ring 6.2 0.1612903226 9ol.
R Pinky 6.1 0.1639344262 0p;'

Typing different letter on same finger:
L Pinky 4.6 0.2173913043
L Ring 4.6 0.2173913043
L Mid 4.5 0.2222222222
L Index 5.3 0.1886792453
R Index 5.4 0.1851851852
R Mid 5.1 0.1960784314
R Ring 5.2 0.1923076923
R Pinky 5.2 0.1923076923


Same data in CSV format.



It takes



.75 * (first_finger_same_letter_time + second_finger_same_letter_time) / 2


time to switch between two fingers.



Challenge



Given a string as input, how long does it take to type it?



  • The "timer" starts the moment the first key is pressed and ends when the last key is pressed. You are just counting the time between keypresses.

  • This is code-golf. Shortest answer in bytes wins.

  • Submission can be either a complete program or function.

  • Input and output any way you want it, stdin/out, function params, file, doesn't matter.

  • Output should be accurate to at least 3 decimal places (+/- 0.001 for rounding error is fine). Leading 0. for numbers under 1 and trailing newline optional.

  • Input will be a string that contains (lowercase) a-z, 0-9, space, semicolon, comma, period, and apostrophe.

  • I always type spaces with my right thumb.

  • I use the normal touch typing fingers (you can also look at the above table for finger-key mappings).

  • Reference code used to generate test cases

Test cases



(empty string or any one-character string) - 0.000



aa - 0.192



fff - 0.364



fj - 0.123



the quick brown fox jumped over the lazy dog - 5.795



yellowwooddoor - 1.983



orangewooddoor - 1.841



jump on it, jump on it - 2.748



type on it, type on it - 2.549



abcdefghijklmnopqrstuvwxyz01234567890 ;,.' - 5.746



ok, this may not be the most accurate but it's in the ballpark, maybe within 30 percent or so. - 12.138










share|improve this question











$endgroup$




Introduction



I can type at a moderate pace, using the QWERTY keyboard layout. But if a word like yellowwooddoor has a ton of repeated letters, it takes a bit longer to type it. Even worse is when a word like "jump" has the same finger used for multiple different consecutive letters.



Here's how long it takes me to type letters on each finger (very unscientifically measured):



Columns are Finger name, keystrokes/second, seconds/keystroke, and the keys used by each finger



Typing same letter twice: 
L Pinky 5.2 0.1923076923 1qaz
L Ring 5 0.2 2wsx
L Mid 5.3 0.1886792453 3edc
L Index 5.5 0.1818181818 4rfv5tgb
R Thumb 6.5 0.1538461538 [space]
R Index 6.9 0.1449275362 6yhn7ujm
R Mid 6.3 0.1587301587 8ik,
R Ring 6.2 0.1612903226 9ol.
R Pinky 6.1 0.1639344262 0p;'

Typing different letter on same finger:
L Pinky 4.6 0.2173913043
L Ring 4.6 0.2173913043
L Mid 4.5 0.2222222222
L Index 5.3 0.1886792453
R Index 5.4 0.1851851852
R Mid 5.1 0.1960784314
R Ring 5.2 0.1923076923
R Pinky 5.2 0.1923076923


Same data in CSV format.



It takes



.75 * (first_finger_same_letter_time + second_finger_same_letter_time) / 2


time to switch between two fingers.



Challenge



Given a string as input, how long does it take to type it?



  • The "timer" starts the moment the first key is pressed and ends when the last key is pressed. You are just counting the time between keypresses.

  • This is code-golf. Shortest answer in bytes wins.

  • Submission can be either a complete program or function.

  • Input and output any way you want it, stdin/out, function params, file, doesn't matter.

  • Output should be accurate to at least 3 decimal places (+/- 0.001 for rounding error is fine). Leading 0. for numbers under 1 and trailing newline optional.

  • Input will be a string that contains (lowercase) a-z, 0-9, space, semicolon, comma, period, and apostrophe.

  • I always type spaces with my right thumb.

  • I use the normal touch typing fingers (you can also look at the above table for finger-key mappings).

  • Reference code used to generate test cases

Test cases



(empty string or any one-character string) - 0.000



aa - 0.192



fff - 0.364



fj - 0.123



the quick brown fox jumped over the lazy dog - 5.795



yellowwooddoor - 1.983



orangewooddoor - 1.841



jump on it, jump on it - 2.748



type on it, type on it - 2.549



abcdefghijklmnopqrstuvwxyz01234567890 ;,.' - 5.746



ok, this may not be the most accurate but it's in the ballpark, maybe within 30 percent or so. - 12.138







code-golf string number






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago







Daniel M.

















asked 5 hours ago









Daniel M.Daniel M.

1,99111936




1,99111936











  • $begingroup$
    Are you sure you use the QUERTY keyboard, not the QWERTY one?
    $endgroup$
    – Embodiment of Ignorance
    3 hours ago










  • $begingroup$
    @EmbodimentofIgnorance oops.
    $endgroup$
    – Daniel M.
    3 hours ago
















  • $begingroup$
    Are you sure you use the QUERTY keyboard, not the QWERTY one?
    $endgroup$
    – Embodiment of Ignorance
    3 hours ago










  • $begingroup$
    @EmbodimentofIgnorance oops.
    $endgroup$
    – Daniel M.
    3 hours ago















$begingroup$
Are you sure you use the QUERTY keyboard, not the QWERTY one?
$endgroup$
– Embodiment of Ignorance
3 hours ago




$begingroup$
Are you sure you use the QUERTY keyboard, not the QWERTY one?
$endgroup$
– Embodiment of Ignorance
3 hours ago












$begingroup$
@EmbodimentofIgnorance oops.
$endgroup$
– Daniel M.
3 hours ago




$begingroup$
@EmbodimentofIgnorance oops.
$endgroup$
– Daniel M.
3 hours ago










1 Answer
1






active

oldest

votes


















4












$begingroup$


JavaScript (Node.js), 180 bytes





s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t


Try it online!



How?



Storing delays



The helper function $g$ takes an integer $0le x le17$ and returns a delay in seconds.



g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]


The input $x$ is expected to be either:



  • twice the bin number to get the delay for the same letter

  • twice the bin number + 1 to get the delay for different letters

What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by $10$ and converted to ASCII. Conveniently, all resulting characters are printable.



For instance, $5.2$ is stored as chr(52) which is '4'.



Converting a character to a key bin



We use the following hash function to convert an ASCII code $c$ to an index into a lookup table containing the bin numbers in $[0..8]$:



$$i = (((ctimes 45) bmod 91)bmod 73)bmod 41$$



Main loop



The total time $t$ is updated with:



t += // add to t:
1 / p ? // if p is numeric:
p - b ? // if p is not equal to b:
3 / 8 * (g(b) + g(p)) // 0.75 * (g(b) + g(p)) / 2
: // else:
g(b | c != s) // g(b) if c == s or g(b + 1) otherwise
: // else (first iteration):
0 // leave t unchanged


where $p$ is the previous bin and $s$ is the previous character.






share|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "200"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182782%2fhow-long-does-it-take-to-type-this%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4












    $begingroup$


    JavaScript (Node.js), 180 bytes





    s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t


    Try it online!



    How?



    Storing delays



    The helper function $g$ takes an integer $0le x le17$ and returns a delay in seconds.



    g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]


    The input $x$ is expected to be either:



    • twice the bin number to get the delay for the same letter

    • twice the bin number + 1 to get the delay for different letters

    What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by $10$ and converted to ASCII. Conveniently, all resulting characters are printable.



    For instance, $5.2$ is stored as chr(52) which is '4'.



    Converting a character to a key bin



    We use the following hash function to convert an ASCII code $c$ to an index into a lookup table containing the bin numbers in $[0..8]$:



    $$i = (((ctimes 45) bmod 91)bmod 73)bmod 41$$



    Main loop



    The total time $t$ is updated with:



    t += // add to t:
    1 / p ? // if p is numeric:
    p - b ? // if p is not equal to b:
    3 / 8 * (g(b) + g(p)) // 0.75 * (g(b) + g(p)) / 2
    : // else:
    g(b | c != s) // g(b) if c == s or g(b + 1) otherwise
    : // else (first iteration):
    0 // leave t unchanged


    where $p$ is the previous bin and $s$ is the previous character.






    share|improve this answer











    $endgroup$

















      4












      $begingroup$


      JavaScript (Node.js), 180 bytes





      s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t


      Try it online!



      How?



      Storing delays



      The helper function $g$ takes an integer $0le x le17$ and returns a delay in seconds.



      g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]


      The input $x$ is expected to be either:



      • twice the bin number to get the delay for the same letter

      • twice the bin number + 1 to get the delay for different letters

      What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by $10$ and converted to ASCII. Conveniently, all resulting characters are printable.



      For instance, $5.2$ is stored as chr(52) which is '4'.



      Converting a character to a key bin



      We use the following hash function to convert an ASCII code $c$ to an index into a lookup table containing the bin numbers in $[0..8]$:



      $$i = (((ctimes 45) bmod 91)bmod 73)bmod 41$$



      Main loop



      The total time $t$ is updated with:



      t += // add to t:
      1 / p ? // if p is numeric:
      p - b ? // if p is not equal to b:
      3 / 8 * (g(b) + g(p)) // 0.75 * (g(b) + g(p)) / 2
      : // else:
      g(b | c != s) // g(b) if c == s or g(b + 1) otherwise
      : // else (first iteration):
      0 // leave t unchanged


      where $p$ is the previous bin and $s$ is the previous character.






      share|improve this answer











      $endgroup$















        4












        4








        4





        $begingroup$


        JavaScript (Node.js), 180 bytes





        s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t


        Try it online!



        How?



        Storing delays



        The helper function $g$ takes an integer $0le x le17$ and returns a delay in seconds.



        g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]


        The input $x$ is expected to be either:



        • twice the bin number to get the delay for the same letter

        • twice the bin number + 1 to get the delay for different letters

        What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by $10$ and converted to ASCII. Conveniently, all resulting characters are printable.



        For instance, $5.2$ is stored as chr(52) which is '4'.



        Converting a character to a key bin



        We use the following hash function to convert an ASCII code $c$ to an index into a lookup table containing the bin numbers in $[0..8]$:



        $$i = (((ctimes 45) bmod 91)bmod 73)bmod 41$$



        Main loop



        The total time $t$ is updated with:



        t += // add to t:
        1 / p ? // if p is numeric:
        p - b ? // if p is not equal to b:
        3 / 8 * (g(b) + g(p)) // 0.75 * (g(b) + g(p)) / 2
        : // else:
        g(b | c != s) // g(b) if c == s or g(b + 1) otherwise
        : // else (first iteration):
        0 // leave t unchanged


        where $p$ is the previous bin and $s$ is the previous character.






        share|improve this answer











        $endgroup$




        JavaScript (Node.js), 180 bytes





        s=>(B=Buffer)(s).map(p=c=>(b='23841410645532207643205431765001333746443'[c*45%91%73%41]*2,t+=1/p?p-b?3/8*(g(b)+g(p)):g(b|c!=s):0,p=b,s=c),t=0,g=x=>10/B('4.2.5-75E6?3>4=4AA')[x])&&t


        Try it online!



        How?



        Storing delays



        The helper function $g$ takes an integer $0le x le17$ and returns a delay in seconds.



        g = x => 10 / Buffer('4.2.5-75E6?3>4=4AA')[x]


        The input $x$ is expected to be either:



        • twice the bin number to get the delay for the same letter

        • twice the bin number + 1 to get the delay for different letters

        What is actually stored in the string '4.2.5-75E6?3>4=4AA' is the number of keystrokes per second multiplied by $10$ and converted to ASCII. Conveniently, all resulting characters are printable.



        For instance, $5.2$ is stored as chr(52) which is '4'.



        Converting a character to a key bin



        We use the following hash function to convert an ASCII code $c$ to an index into a lookup table containing the bin numbers in $[0..8]$:



        $$i = (((ctimes 45) bmod 91)bmod 73)bmod 41$$



        Main loop



        The total time $t$ is updated with:



        t += // add to t:
        1 / p ? // if p is numeric:
        p - b ? // if p is not equal to b:
        3 / 8 * (g(b) + g(p)) // 0.75 * (g(b) + g(p)) / 2
        : // else:
        g(b | c != s) // g(b) if c == s or g(b + 1) otherwise
        : // else (first iteration):
        0 // leave t unchanged


        where $p$ is the previous bin and $s$ is the previous character.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 2 hours ago

























        answered 3 hours ago









        ArnauldArnauld

        80.5k797333




        80.5k797333



























            draft saved

            draft discarded
















































            If this is an answer to a challenge…



            • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


            • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
              Explanations of your answer make it more interesting to read and are very much encouraged.


            • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


            More generally…



            • …Please make sure to answer the question and provide sufficient detail.


            • …Avoid asking for help, clarification or responding to other answers (use comments instead).




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f182782%2fhow-long-does-it-take-to-type-this%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

            Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

            Aasi (pallopeli) Navigointivalikko