We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2e08fd commit c2299ecCopy full SHA for c2299ec
scripts/algorithms/D/Day of the Year/Day of the Year.py
@@ -1,3 +1,4 @@
1
+// Runtime: 123 ms (Top 44.98%) | Memory: 14 MB (Top 32.35%)
2
class Solution:
3
def dayOfYear(self, date: str) -> int:
4
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:
13
14
ans=0
15
for i in range(1,month+1):
16
ans+=d[i]
- return ans-(d[month]-day)
17
+ return ans-(d[month]-day)
0 commit comments