Submission #74308304
Source Code Expand
n = int(input())
a = list(map(int, input().split()))
e = 0
for i in range(n):
b = a.copy()
while len(b)>1:
b = [x - a[i] for x in b]
b = [x for x in b if x != 0]
e+= (b[0]**2)/n
print(e%998244353)
Submission Info
| Submission Time | |
|---|---|
| Task | G - Random Subtraction |
| User | akhiko |
| Language | Python (CPython 3.13.7) |
| Score | 0 |
| Code Size | 233 Byte |
| Status | RE |
| Exec Time | > 2000 ms |
| Memory | 39528 KiB |
Judge Result
| Set Name | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 575 | ||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 01_01.txt, 01_02.txt, 01_03.txt, 01_04.txt, 01_05.txt, 01_06.txt, 01_07.txt, 01_08.txt, 01_09.txt, 01_10.txt, 01_11.txt, 01_12.txt, 01_13.txt, 01_14.txt, 01_15.txt, 01_16.txt, 01_17.txt, 01_18.txt, 01_19.txt, 01_20.txt, 02_01.txt, 02_02.txt, 02_03.txt, 02_04.txt, 02_05.txt, 02_06.txt, 02_07.txt, 02_08.txt, 02_09.txt, 02_10.txt, 02_11.txt, 02_12.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | TLE | > 2000 ms | 9024 KiB |
| 00_sample_02.txt | TLE | > 2000 ms | 9036 KiB |
| 01_01.txt | WA | 12 ms | 9180 KiB |
| 01_02.txt | WA | 11 ms | 9236 KiB |
| 01_03.txt | WA | 11 ms | 9056 KiB |
| 01_04.txt | WA | 12 ms | 9128 KiB |
| 01_05.txt | TLE | > 2000 ms | 9064 KiB |
| 01_06.txt | TLE | > 2000 ms | 9056 KiB |
| 01_07.txt | TLE | > 2000 ms | 9064 KiB |
| 01_08.txt | TLE | > 2000 ms | 9052 KiB |
| 01_09.txt | TLE | > 2000 ms | 30904 KiB |
| 01_10.txt | TLE | > 2000 ms | 16576 KiB |
| 01_11.txt | TLE | > 2000 ms | 20528 KiB |
| 01_12.txt | TLE | > 2000 ms | 33384 KiB |
| 01_13.txt | TLE | > 2000 ms | 31508 KiB |
| 01_14.txt | TLE | > 2000 ms | 26024 KiB |
| 01_15.txt | TLE | > 2000 ms | 39456 KiB |
| 01_16.txt | TLE | > 2000 ms | 39528 KiB |
| 01_17.txt | TLE | > 2000 ms | 39316 KiB |
| 01_18.txt | TLE | > 2000 ms | 39324 KiB |
| 01_19.txt | TLE | > 2000 ms | 39364 KiB |
| 01_20.txt | TLE | > 2000 ms | 39332 KiB |
| 02_01.txt | WA | 12 ms | 9192 KiB |
| 02_02.txt | WA | 11 ms | 9064 KiB |
| 02_03.txt | RE | 26 ms | 11660 KiB |
| 02_04.txt | RE | 24 ms | 11672 KiB |
| 02_05.txt | RE | 24 ms | 11664 KiB |
| 02_06.txt | RE | 24 ms | 11660 KiB |
| 02_07.txt | RE | 45 ms | 14272 KiB |
| 02_08.txt | RE | 62 ms | 31116 KiB |
| 02_09.txt | RE | 45 ms | 14120 KiB |
| 02_10.txt | RE | 61 ms | 30980 KiB |
| 02_11.txt | RE | 45 ms | 14052 KiB |
| 02_12.txt | RE | 61 ms | 30980 KiB |