66d专题

F - Petya and His Friends CodeForces - 66D(数论,素数构造)

Examples Input 3 Output 99 55 11115 Input 4 Output 385 360 792 8360 题意: 构造题,构造n个不相同的数,任意两个数gcd不等于1,所有数的gcd等于1. 思路: 个人认为这场最有想头的一道题目。最暴力的思路是打表搞出n个质数,第一个数除了第一个质数不选其他都选相乘,第二个数除了第二个数不选其他都选相乘。当然数据范围是承受不了的(

Codeforces - 66D - Petya and His Friends(数论质数+思维)

题目: Little Petya has a birthday soon. Due this wonderful event, Petya's friends decided to give him sweets. The total number of Petya's friends equals to n. Let us remind you the definition of the g