Skip to content

Commit c2299ec

Browse files
committed
Runtime: 123 ms (Top 44.98%) | Memory: 14 MB (Top 32.35%)
1 parent b2e08fd commit c2299ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/D/Day of the Year/Day of the Year.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 123 ms (Top 44.98%) | Memory: 14 MB (Top 32.35%)
12
class Solution:
23
def dayOfYear(self, date: str) -> int:
34
d={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
@@ -13,4 +14,4 @@ def dayOfYear(self, date: str) -> int:
1314
ans=0
1415
for i in range(1,month+1):
1516
ans+=d[i]
16-
return ans-(d[month]-day)
17+
return ans-(d[month]-day)

0 commit comments

Comments
 (0)