《射雕英雄传》现在看来没那么精彩了# TVChinese - 中文电视
a*o
1 楼
Google Interview Question for Software Enginee
题目如下:
1. A
2. Ctrl+A
3. Ctrl+C
4. Ctrl+V
If you can only press the keyboard for N times (with the above four keys),
please write a program to produce maximum numbers of A. If possible, please
also print out the sequence of keys.
That is to say, the input parameter is N (No. of keys that you can press),
the output is M (No. of As that you can produce).
给了大约30分钟时间,最后没搞定。请各位大侠赐教,谢谢!
题目如下:
1. A
2. Ctrl+A
3. Ctrl+C
4. Ctrl+V
If you can only press the keyboard for N times (with the above four keys),
please write a program to produce maximum numbers of A. If possible, please
also print out the sequence of keys.
That is to say, the input parameter is N (No. of keys that you can press),
the output is M (No. of As that you can produce).
给了大约30分钟时间,最后没搞定。请各位大侠赐教,谢谢!