Instructor Zhang's birthday question c # implementation

Source: Internet
Author: User

1 using System;
2 using System. Collections. Generic;
3 using System. Linq;
4 using System. Text;
5
6 namespace Birthday
7 {
8 class Program
9 {
10 /**/
11 /// <summary>
12 // both Xiao Ming and Xiao Qiang are students of Teacher Zhang. The birthday of Teacher Zhang is M-N,
13 // both of them know that Teacher Zhang's life is one day in the following 10 groups,
14 // instructor Zhang told James the M value and the N value to Xiaoqiang,
15 // Teacher Zhang asked them if they knew his birthday was that day?
16 // March 4 March 5 March 8
17 // June 4 June 7
18 // September 1 September 5
19 // December 1 December 2 December 8
20 // James said: If I don't know, I'm sure I don't know either.
21 // Xiaoqiang said: I didn't know either, but now I know
22 // James said: Oh, I know it too.
23 // based on the preceding dialog, determine the day of Miss Zhang's birthday ??
24 ///
25 /// Author: Mu Zi
26 // CopyRight: http://blog.moozi.net/
27 /// </summary>
28 /// <param name = "args"> </param>
29 static void Main (string [] args)
30 {
31 Dictionary <int, int []> birthdays = new Diction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.