codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

2041A.md (1675B)


      1 Source: https://codeforces.com/problemset/problem/2041/A
      2 
      3 A. The Bento Box Adventure
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 1024 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 ![](https://espresso.codeforces.com/6bbde4d4958fe445972d925a03e74ef7a5c4f6f8.png) Image generated by ChatGPT 4o. 
     22 
     23 Boxed meals in Taiwan are very common, offering convenient and affordable nutrition-balanced choices for students and office workers. These meals typically include a variety of vegetables, protein, and rice, providing a well-rounded diet. With numerous options available at local self-service restaurants, they are a popular choice for those looking for a quick, healthy lunch.
     24 
     25 There are five Taiwanese self-service restaurants numbered from 1 to 5. You plan to visit a different restaurant each day from Monday to Friday to pack a boxed meal for lunch. You've already visited one restaurant from Monday to Thursday, each time visiting a different one. Now, it's Friday, and you want to visit the last remaining restaurant that you haven't been to yet this week.
     26 
     27 Write a program that takes as input the four restaurants you've already visited (one for each day from Monday to Thursday) and outputs the restaurant you should visit on Friday.
     28 
     29 Input
     30 
     31 A single line of input containing four integers $a, b, c, d$, each between 1 and 5 (inclusive), representing the restaurant numbers you visited from Monday to Thursday, in order.
     32 
     33 * $1\le a, b, c, d\le 5$
     34 * All four numbers will be different.
     35 
     36 Output
     37 
     38 Output the restaurant number you should visit on Friday.
     39 
     40 Examples
     41 
     42 Input
     43 
     44 ```
     45 1 3 2 5
     46 ```
     47 
     48 Output
     49 
     50 ```
     51 4
     52 ```
     53 
     54 Input
     55 
     56 ```
     57 2 5 4 3
     58 ```
     59 
     60 Output
     61 
     62 ```
     63 1
     64 ```