Submission #58961541
Source Code Expand
Copy
N,C=map(int,input().split())T=list(map(int,input().split()))sum=0time=0for i in range(1,N+1):if i==1:sum+=1time=T[0]elif 2<=i<=N:if T[i-1]-time>=C:sum+=1time=T[i-1]else:sum+=0print(sum)
N,C=map(int,input().split()) T=list(map(int,input().split())) sum=0 time=0 for i in range(1,N+1): if i==1: sum+=1 time=T[0] elif 2<=i<=N: if T[i-1]-time>=C: sum+=1 time=T[i-1] else: sum+=0 print(sum)
Submission Info
Submission Time | |
---|---|
Task | A - Candy Button |
User | santomo |
Language | Python (CPython 3.11.4) |
Score | 150 |
Code Size | 253 Byte |
Status | AC |
Exec Time | 10 ms |
Memory | 8608 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 150 / 150 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 02_handmade_00.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 10 ms | 8516 KB |
00_sample_01.txt | AC | 10 ms | 8572 KB |
00_sample_02.txt | AC | 10 ms | 8464 KB |
01_random_00.txt | AC | 9 ms | 8536 KB |
01_random_01.txt | AC | 10 ms | 8480 KB |
01_random_02.txt | AC | 10 ms | 8608 KB |
01_random_03.txt | AC | 10 ms | 8524 KB |
01_random_04.txt | AC | 10 ms | 8504 KB |
01_random_05.txt | AC | 10 ms | 8460 KB |
01_random_06.txt | AC | 10 ms | 8356 KB |
01_random_07.txt | AC | 10 ms | 8544 KB |
02_handmade_00.txt | AC | 10 ms | 8516 KB |
02_handmade_01.txt | AC | 10 ms | 8412 KB |
02_handmade_02.txt | AC | 10 ms | 8488 KB |
02_handmade_03.txt | AC | 10 ms | 8460 KB |
02_handmade_04.txt | AC | 10 ms | 8536 KB |
02_handmade_05.txt | AC | 10 ms | 8472 KB |