All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Date Count Conclusion (Posted on 2015-01-29)
Express a given date in 2015 in the MM/DD/YY format.

Determine the total number of distinct dates in 2015 such that MM*DD divides 2000 or 2002.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution (spoiler) Comment 1 of 1
46 divide into 2000; 24 divide into 2002, with 3 dividing into both so 67 divide into one or the other, inclusive:

`1 1 20001 1 2002^^^^ both1 2 20001 2 2002^^^^ both1 4 20001 5 20001 7 20021 8 20001 10 20001 11 20021 13 20021 14 20021 16 20001 20 20001 22 20021 25 20001 26 20022 1 20002 1 2002^^^^ both2 2 20002 4 20002 5 20002 7 20022 8 20002 10 20002 11 20022 13 20022 20 20002 25 20004 1 20004 2 20004 4 20004 5 20004 10 20004 20 20004 25 20005 1 20005 2 20005 4 20005 5 20005 8 20005 10 20005 16 20005 20 20005 25 20007 1 20027 2 20027 11 20027 13 20027 22 20027 26 20028 1 20008 2 20008 5 20008 10 20008 25 200010 1 200010 2 200010 4 200010 5 200010 8 200010 10 200010 20 200010 25 200011 1 200211 2 200211 7 200211 13 200211 14 200211 26 200246 24    3 67`

DefDbl A-Z
Dim crlf\$, molen(12)

Text1.Text = ""
crlf\$ = Chr(13) + Chr(10)
Form1.Visible = True
molen(1) = 31
molen(2) = 28
molen(3) = 31
molen(4) = 30
molen(5) = 31
molen(6) = 30
molen(7) = 31
molen(8) = 31
molen(9) = 30
molen(10) = 31
molen(11) = 30
molen(12) = 31

For m = 1 To 12
For d = 1 To molen(m)
pr = m * d
If 2000 Mod pr = 0 Then s1 = s1 + 1: Text1.Text = Text1.Text & m & Str(d) & " 2000" & crlf
If 2002 Mod pr = 0 Then s2 = s2 + 1: Text1.Text = Text1.Text & m & Str(d) & " 2002" & crlf
If 2000 Mod pr = 0 And 2002 Mod pr = 0 Then both = both + 1: Text1.Text = Text1.Text & "^^^^ both" & crlf
If 2000 Mod pr = 0 Or 2002 Mod pr = 0 Then either = either + 1
Next
Next
Text1.Text = Text1.Text & s1 & Str(s2) & "   " & Str(both) & Str(either) & crlf

End Sub

 Posted by Charlie on 2015-01-29 09:50:44

 Search: Search body:
Forums (3)
Random Problem
Site Statistics
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox: