Submission #3772851
Source Code Expand
N=int(input()) a=[int(i) for i in input().split()] ans=0 while True: f=0 for i in range(N): if a[i]>=N: d=a[i]//N ans+=d a[i]%=N for j in range(N): if i!=j: a[j]+=d else: f+=1 if f==N: break print(ans)
Submission Info
Submission Time | |
---|---|
Task | E - Decrease (Judge ver.) |
User | Chanyuh |
Language | PyPy3 (2.4.0) |
Score | 600 |
Code Size | 306 Byte |
Status | AC |
Exec Time | 226 ms |
Memory | 42076 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 600 / 600 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0, example1, example2, example3, example4 |
All | example0, example1, example2, example3, example4, maxrand0, maxrand1, maxrand2, maxrand3, maxrand4, maxrand5, maxrand6, maxrand7, maxrand8, maxrand9, rand0, rand1, rand2, rand3, rand4, rand5, rand6, rand7, rand8, rand9, small0, small1, small2, small3, small4, small5, small6, small7, small8, small9 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example0 | AC | 173 ms | 38256 KB |
example1 | AC | 176 ms | 38256 KB |
example2 | AC | 172 ms | 38256 KB |
example3 | AC | 178 ms | 38256 KB |
example4 | AC | 194 ms | 39536 KB |
maxrand0 | AC | 179 ms | 38256 KB |
maxrand1 | AC | 222 ms | 41564 KB |
maxrand2 | AC | 173 ms | 38256 KB |
maxrand3 | AC | 225 ms | 41820 KB |
maxrand4 | AC | 179 ms | 38768 KB |
maxrand5 | AC | 226 ms | 42076 KB |
maxrand6 | AC | 185 ms | 39024 KB |
maxrand7 | AC | 217 ms | 41564 KB |
maxrand8 | AC | 181 ms | 39024 KB |
maxrand9 | AC | 215 ms | 41436 KB |
rand0 | AC | 184 ms | 39024 KB |
rand1 | AC | 197 ms | 39664 KB |
rand2 | AC | 197 ms | 39664 KB |
rand3 | AC | 201 ms | 40048 KB |
rand4 | AC | 194 ms | 39664 KB |
rand5 | AC | 196 ms | 39664 KB |
rand6 | AC | 206 ms | 39792 KB |
rand7 | AC | 223 ms | 40944 KB |
rand8 | AC | 191 ms | 39024 KB |
rand9 | AC | 196 ms | 39664 KB |
small0 | AC | 177 ms | 38256 KB |
small1 | AC | 190 ms | 38768 KB |
small2 | AC | 182 ms | 38256 KB |
small3 | AC | 180 ms | 38256 KB |
small4 | AC | 193 ms | 39152 KB |
small5 | AC | 197 ms | 39152 KB |
small6 | AC | 192 ms | 38896 KB |
small7 | AC | 182 ms | 38640 KB |
small8 | AC | 194 ms | 39408 KB |
small9 | AC | 189 ms | 39152 KB |