flâneur — a map of the web's best reading

22Fall HKU MSc(Computer Science) Admission Test & Interview Written Test Interview Experience-Zhihu

zhuanlan.zhihu.com · saved by 1 readers

Write a program (using either Python, Java, C or C++) that (i) inputs a positive integer n, (ii) prints a line of consecutive integers from 2 to n (inclusively), and then (iii) repeatedly inputs a prime number f and do the following until f = 2: prints a line of integers constructed by removing from the previously printed line those integers that have an odd number of factor f. (For example, the integer 24 = 2 × 2 ×2 × 3 has an odd number of factor 2.) Following is an example on the execution of the program: Reference Code: There may be bugs, please let me know. Consider the following diagram. Can you connect each small box on the top with its same-letter mate on the bottom with paths that do not cross one another, not leave the boundaries of the large box. Justify your answer (ie, if your answer is 'yes' , draw the paths, and if you answer is 'no', explain why). Reference answer: No. Find the following indefinite integers: Reference answer: On a flight of United airline, 5% of the pas

Explore this link on the map →

saved by