2 25608 24027
7680 16016
模板:
#include <stdio.h> #include <string.h> int oular(int n){ int sum = 1; for(int i = 2; i*i <= n; i ++){ if(n%i == 0){ n /= i; sum *= (i-1); while(n%i == 0){ sum *= i; n /= i; } } } if(n > 1) sum*=(n-1); return sum; } int main(){ int t, n; scanf("%d", &t); while(t --){ scanf("%d", &n); printf("%d\n", oular(n)); } return 0; }
原文地址:http://blog.csdn.net/shengweisong/article/details/41101367