You’re starting with a blank document, a standard computer text editor. You need to make “the sentence” appear 100 times, each sentence on a separate line. A sentence does not have to be re-copied in order to be pasted more than once, as per standard copy/paste procedure.
What is the fastest way to get the sentence to appear exactly 100 times?
You have only 4 main actions available to you:
Write the sentence (and if need be, move to the next line): 3 seconds
Writing the sentence 100 times is 300 seconds, so that gives us an upper bound.
Try this: Get 4 copies of the sentence by writing it once, copying it, and pasting it three times (10 seconds). Then select and copy those (6 seconds) and paste them 24 times (48 seconds). That gives you a grand total of 64 seconds.
I don’t think you can do any better because of the high cost of copying mulitple lines.
Get 5 copies of the sentence by writing it once, copying it, and pasting it 4 times (12 seconds). Then select and copy those (7 seconds) and paste them 19 times (38 seconds). That gives you a grand total of 57 seconds.
The next factor of 100 is even better:
Get 10 copies of the sentence by writing it once, copying it, and pasting it 9 times (22 seconds). Then select and copy those (12 seconds) and paste them 9 times (18 seconds). That gives you a grand total of 52 seconds.
When n is not a proper divisor of 100, the equation becomes more complicated. Since there’s no cost given for deleting a copy of the sentence, there’s not enough information to give a complete answer. I guess you could assume that selecting lines and cutting them is the same cost as selecting and copying them, but I don’t have time to do that analysis right now.
I view selecting document via Ctrl-A as equivalent to select the sentence. If anything, it’s easer.
Each copy cycle is 7 seconds (1 for select, 2 for copy, 2 for paste, 2 for paste)
write sentence 4 times (3 sec*4=12 sec)
copy cycle (7 sec), now 8 sentences
copy cycle (7 sec), now 16 sentences
copy cycle (7 sec), now 32 sentences
paste (still have 16 sentences in buffer) 5 more times (10 seconds), now 112 sentences
Total time: 43 seconds. Further refinements of this technique could probably shave another couple.
Come to think of it, there’s an easier way yet. Just **hold down ** Ctrl-V. Once the auto-repeat catches, you’ll have 100 sentences before you know what happened!
Are we doing this excercise on imaginary computers using imaginary constraints?
I just did this in Word in about 12 seconds.
Typed the sentence,
Selected the sentence and hit Ctrl-C
Ctrl-V’d the sentence four times.
Ctrl-A and Ctrl-C
Ctrl-V 20 times
Of course, had I been in ISPF, (which I consider a standard computer text editor–although it is the best), I’d have typed the sentence, typed c on the first line, then typed b99 on the next line and I’d have been done a lot faster.
I suspect the answer is yes. The OP used “Riddle” in the subject and laid down a set of rules. The scenario is just flavoring to help you understand the riddle, not a free license to break the ground rules IMHO. Otherwise, non-imaginary airplane on treadmills would be wildly impractical, too.
The OP is poorly formed. It makes reference to both “standard computer text editor” and “standard copy/paste”, both of which imply a real-world connection. Then it posits specific rules with unrealistic time durations,non of which are true for a standard computer text editor, so that impies a pure mathematical exercise. UncleBeer and TomnDeb both have some confusion also. So seeing as the guest hasn’t come along to distinguish, I think my solution is reasonable, or at least worth mentioning.