diff options
Diffstat (limited to 'progs/a652.py')
-rw-r--r-- | progs/a652.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/progs/a652.py b/progs/a652.py new file mode 100644 index 0000000..52a274b --- /dev/null +++ b/progs/a652.py @@ -0,0 +1,14 @@ +def odd_Days(N):
+ hund1 = N // 100
+ hund4 = N // 400
+ leap = N >> 2
+ ordd = N - leap
+ if (hund1):
+ ordd += hund1
+ leap -= hund1
+ if (hund4):
+ ordd -= hund4
+ leap += hund4
+ days = ordd + leap * 2
+ odd = days % 7
+ return odd
\ No newline at end of file |