Submission #74684277
Source Code Expand
def counter(a1, b1):
cnt = 0
for i in range(len(a1)):
for j in range(len(b1)):
cnt += a1[i] * b1[j] * ((i + 1) % (j + 1))
return cnt%998244353
a, b = map(int, input().split())
a1 = list(map(int, input().split()))
b1 = list(map(int, input().split()))
print(counter(a1, b1))
Submission Info
| Submission Time | |
|---|---|
| Task | E - You WILL Like Sigma Problem |
| User | Abdymanapov4321 |
| Language | Python (PyPy 3.11-v7.3.20) |
| Score | 0 |
| Code Size | 313 Byte |
| Status | TLE |
| Exec Time | > 2000 ms |
| Memory | 263448 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 450 | ||||||
| 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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-01.txt | AC | 49 ms | 79852 KiB |
| 00-sample-02.txt | AC | 48 ms | 80036 KiB |
| 01-01.txt | AC | 47 ms | 79720 KiB |
| 01-02.txt | AC | 47 ms | 79652 KiB |
| 01-03.txt | AC | 47 ms | 79772 KiB |
| 01-04.txt | AC | 417 ms | 108420 KiB |
| 01-05.txt | AC | 489 ms | 108448 KiB |
| 01-06.txt | AC | 488 ms | 108256 KiB |
| 01-07.txt | AC | 490 ms | 108464 KiB |
| 01-08.txt | AC | 489 ms | 108584 KiB |
| 01-09.txt | TLE | > 2000 ms | 263276 KiB |
| 01-10.txt | TLE | > 2000 ms | 262652 KiB |
| 01-11.txt | AC | 126 ms | 174972 KiB |
| 01-12.txt | AC | 129 ms | 175036 KiB |
| 01-13.txt | AC | 446 ms | 180120 KiB |
| 01-14.txt | TLE | > 2000 ms | 197392 KiB |
| 01-15.txt | TLE | > 2000 ms | 263292 KiB |
| 01-16.txt | TLE | > 2000 ms | 263012 KiB |
| 01-17.txt | TLE | > 2000 ms | 263436 KiB |
| 01-18.txt | TLE | > 2000 ms | 263448 KiB |
| 01-19.txt | AC | 123 ms | 174880 KiB |
| 01-20.txt | TLE | > 2000 ms | 192520 KiB |