Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

TOTIENT - Totient function

W teorii liczb tocjent to funkcja przypisująca każdej liczbie naturalnej liczbę liczb względnie z nią pierwszych mniejszych od niej samej.

Input

W pierwszej linii znajduje się liczba testów t (t<101).

Każda z kolejnych t linii zawiera liczbę n (n<2*10^9).

Output

Dla każdego testu wypisz φ(n)

Przykład

Wejście:
3
1
6
100
Wyjście:
1
2
40


Added by:Piotr Kąkol
Date:2010-02-14
Time limit:9.687s-19.58s
Source limit:5000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS OBJC SCM qobi VB.NET

hide comments
2014-03-10 10:47:49 Piotr KÄ…kol
Thanks for the info. Fixed. Seems spoj.pl is down.
2014-03-05 14:21:22 Hallvard Norheim Bø
@Piotr: I found the reason for failure.
Math.factor() only does trial divison by the first 1024 primes!

Also note that all links on the SHORTEN pages which starts with
spoj.pl has stopped working. On the Links page, the RSS feed, etc.
2014-03-01 02:11:11 Piotr KÄ…kol
You have WA for 490645137.
2014-02-27 18:31:53 Hallvard Norheim Bø
@Piotr: for what input is my latest Pike submission (#11149257) wrong?
2014-02-14 01:55:38 Piotr KÄ…kol
I made a rejudge after adding a test with some small numbers. Feel ashamed for not checking boundary cases, sorry.
2010-08-10 13:46:00 Piotr KÄ…kol
Number of test cases was reduced to 100.
2010-04-01 16:36:51 numerix
Thanks!
2010-03-29 14:46:50 Piotr KÄ…kol
I changed time limit from 10 to 15 sec. ;-)
// And from 15 to 20. :-)

Last edit: 2010-05-18 07:31:52
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.