题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6322

题目大意:给定 k,求第 k 小的数 n,满足 φ(n) 是合数。显然 φ(1) = 1 不是合数,只考虑 n ≥ 2 的情况。
思路:得到题意之后,查到了一张表(https://en.wikipedia.org/wiki/Euler%27s_totient_function)
得知当且仅当 n = 1, 2, 3, 4, 6 时,φ(n) 不是合数。第1小的K值是5,第二小的K值是7,第n(n>=3)小则是n+5;

AC代码:
#include<stdio.h>
#include<string.h>
int main()
{
    long long int T,n,i;
    scanf("%lld",&T);
    while(T--)
    {
        scanf("%lld",&n);
        if(n==1)
            printf("5\n");
        else
            printf("%lld\n",n+5);

    }
    return 0;
}