{"problem":{"name":"Subscribers","description":{"content":"We conducted a survey on newspaper subscriptions. More specifically, we asked each of the $N$ respondents the following two questions: *   Question $1$: Are you subscribing to Newspaper X? *   Questi","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"nikkei2019_qual_a"},"statements":[{"statement_type":"Markdown","content":"We conducted a survey on newspaper subscriptions. More specifically, we asked each of the $N$ respondents the following two questions:\n\n*   Question $1$: Are you subscribing to Newspaper X?\n*   Question $2$: Are you subscribing to Newspaper Y?\n\nAs the result, $A$ respondents answered \"yes\" to Question $1$, and $B$ respondents answered \"yes\" to Question $2$.\nWhat are the maximum possible number and the minimum possible number of respondents subscribing to both newspapers X and Y?\nWrite a program to answer this question.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100$\n*   $0 \\leq A \\leq N$\n*   $0 \\leq B \\leq N$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $A$ $B$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"nikkei2019_qual_a","tags":[],"sample_group":[["10 3 5","3 0\n\nIn this sample, out of the $10$ respondents, $3$ answered they are subscribing to Newspaper X, and $5$ answered they are subscribing to Newspaper Y.\nHere, the number of respondents subscribing to both newspapers is at most $3$ and at least $0$."],["10 7 5","5 2\n\nIn this sample, out of the $10$ respondents, $7$ answered they are subscribing to Newspaper X, and $5$ answered they are subscribing to Newspaper Y.\nHere, the number of respondents subscribing to both newspapers is at most $5$ and at least $2$."],["100 100 100","100 100"]],"created_at":"2026-03-03 11:01:14"}}