Submit | All submissions | Best solutions | Back to list |
SIGMA_EN - Function σ |
Wersja polska | English version |
Dla podanej liczby n wypisz wartość σ(n).
Input
W pierwszej linii liczba testów t (t<200). W kolejnych t liniach liczba n (0<n<=10^9).
Output
W kolejnych t liniach wartość σ(n).
Example
Input:
3
1
6
8
Output:
1
12
15
Added by: | Piotr Kąkol |
Date: | 2010-02-13 |
Time limit: | 7.623s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: SCM qobi |
hide comments
|
|||||
2013-12-01 15:08:55 Mitch Schwartz
There was a period of time when Python submissions were labelled as 2.7 even though they weren't. There were other strange things between Python 2.5, 2.6, and 3.x, and I don't know all the details; numerix wrote about it on some recent problem on main SPOJ but I can't remember which one. So that's probably the reason. |
|||||
2013-11-30 22:12:57 Piotr KÄ…kol
Weird that after rejudging all the submissions on SHORTEN sth's still not right. Rejudge made. |
|||||
2013-11-28 15:09:05 Hallvard Norheim Bø
@Piotr: my leading Python solution is not actually valid in 2.7. I think you need to do a rejudge here. |
|||||
2013-11-28 01:02:09 Piotr KÄ…kol
Acknowledged. |
|||||
2013-11-27 23:36:30 Mitch Schwartz
@Piotr: FYI, for LOOK_SAY and NEXTPERM, my later BF solutions depend on t having certain number of digits, so e.g. adding another test file with very small t would probably wipe out most of my BF improvement history; it's of course easy to fix any submission to make it accept general t, but I'd prefer not to have that happen. :) |
|||||
2013-11-27 22:47:06 Piotr KÄ…kol
Increased TL from 15s to 25s. It's just temporary. I'll fix the size of tests to this and some other tasks (along with adding tests to 2 other tasks) in spare time. Sorry, I didn't think about slower languages while making first tasks. I was even more inexperienced. Last edit: 2013-11-27 22:56:51 |
|||||
2013-08-15 14:01:39 John and the cows
1258 :) |
|||||
2011-02-26 19:23:21 Piotr KÄ…kol
Done. Hope that tests are not easier now. If You find a test for which Your AC program print incorrect output, please write here. |
|||||
2011-02-22 23:07:05 Hallvard Norheim Bø
That would certainly help for interpreted languages without builtins or library support for factoring and prime generation/testing. On a side note, it is possible to do it faster in Python by making a list of primes up to sqrt(1e9) by sieving, before processing the input. This comes at a considerable cost of characters, though. |
|||||
2011-02-22 22:45:01 Piotr KÄ…kol
Hmm. I think increasing time limit isn't the best option so maybe I should reduce no. tests into ~200? |