Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B'Mr. Chanek has an array a of n integers. The prettiness value of a is denoted as: sum_{i=1}^{n} { sum_{j=1}^{n} { gcd(a_i, a_j) cdot gcd(i, j)}} where gcd(x, y) denotes the greatest common divisor (GCD) of integers x and y . In other words, the prettiness value of an array a is the total sum of gcd(a_i, a_j) cdot gcd(i, j) for all pairs (i, j) . Help Mr. Chanek find the prettiness value of a , and output the result modulo 10^9 + 7 ! The first line contains an integer n ( 2 <= q n <= q 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^5 ). Output an integer denoting the prettiness value of a modulo 10^9 + 7 . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
130580008 |
nwi |
G |
Oct. 2, 2021, 3:54 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
592 |
20377600 |
|
|
130579058 |
Melania ttee |
G |
Oct. 2, 2021, 3:43 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
779 |
100761600 |
|
|
130586451 |
davi0015 |
G |
Oct. 2, 2021, 5:16 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
1513 |
84889600 |
|
|
130582558 |
HwSh |
G |
Oct. 2, 2021, 4:25 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
1575 |
18124800 |
|
|
130617883 |
Alan233 |
G |
Oct. 3, 2021, 5:49 a.m. |
OK |
GNU C++14 |
TESTS |
12 |
1716 |
16486400 |
|
|
130572759 |
chenjb shb123 FrostStar |
G |
Oct. 2, 2021, 2:37 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
1903 |
15257600 |
|
|
130578127 |
HwSh |
G |
Oct. 2, 2021, 3:33 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
2121 |
17920000 |
|
|
130573246 |
rtzrtz Kira_1234 KDVinit |
G |
Oct. 2, 2021, 2:42 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
2340 |
25702400 |
|
|
130580001 |
SSerxhs fr200110217102 |
G |
Oct. 2, 2021, 3:53 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
2496 |
6246400 |
|
|
130570397 |
zhouziheng BilyHurington gzchenben |
G |
Oct. 2, 2021, 2:14 p.m. |
OK |
GNU C++14 |
TESTS |
12 |
2994 |
8704000 |
|
|
130567495 |
gisp_zjz |
G |
Oct. 2, 2021, 1:47 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
483 |
14848000 |
|
|
130569691 |
rheallyc cxaphoenix |
G |
Oct. 2, 2021, 2:08 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
623 |
16076800 |
|
|
130577785 |
aarr afterall Amoo_Safar |
G |
Oct. 2, 2021, 3:29 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1403 |
17612800 |
|
|
130595096 |
wiwitrifai |
G |
Oct. 2, 2021, 7:27 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1419 |
24678400 |
|
|
130587306 |
maspy |
G |
Oct. 2, 2021, 5:28 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1435 |
31641600 |
|
|
130573489 |
khuebeo ngfam_kongu chemthan |
G |
Oct. 2, 2021, 2:44 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1637 |
31744000 |
|
|
130589041 |
atodo VELJAODI viovlo |
G |
Oct. 2, 2021, 5:53 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1638 |
26419200 |
|
|
130566783 |
Retired_MiFaFaOvO TLE Miracle03 |
G |
Oct. 2, 2021, 1:40 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1699 |
15872000 |
|
|
130571869 |
Bugman |
G |
Oct. 2, 2021, 2:28 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1715 |
16384000 |
|
|
130593232 |
Yousef_Salama |
G |
Oct. 2, 2021, 6:52 p.m. |
OK |
GNU C++17 |
TESTS |
12 |
1794 |
15257600 |
|
|
130589839 |
edisonhello skylinebaby waynetuinfor |
G |
Oct. 2, 2021, 6:03 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
343 |
21401600 |
|
|
130570770 |
YouKn0wWho Raiden steinum |
G |
Oct. 2, 2021, 2:18 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
389 |
18432000 |
|
|
130568276 |
YouKn0wWho |
G |
Oct. 2, 2021, 1:55 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
389 |
18432000 |
|
|
130587122 |
Heltion |
G |
Oct. 2, 2021, 5:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
405 |
24371200 |
|
|
130607008 |
Life.1s.Suck |
G |
Oct. 3, 2021, 1:26 a.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
420 |
31744000 |
|
|
130574429 |
DreamingLeaf JooDdae edenooo |
G |
Oct. 2, 2021, 2:54 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
514 |
18124800 |
|
|
130587063 |
.I. -is-this-fft- |
G |
Oct. 2, 2021, 5:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
795 |
15974400 |
|
|
130574794 |
dario2994 |
G |
Oct. 2, 2021, 2:57 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
873 |
120115200 |
|
|
130573213 |
triple__a kimoyami Roundgod |
G |
Oct. 2, 2021, 2:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
1232 |
19353600 |
|
|
130582938 |
trainwithoutpain |
G |
Oct. 2, 2021, 4:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
12 |
1263 |
22835200 |
|
|
130585900 |
clyring |
G |
Oct. 2, 2021, 5:09 p.m. |
OK |
Haskell |
TESTS |
12 |
2854 |
85094400 |
|
|
130590234 |
sansen |
G |
Oct. 2, 2021, 6:08 p.m. |
OK |
Rust |
TESTS |
12 |
2683 |
107724800 |
|
|
remove filters
Back to search problems