89. A Student Record
Foundation1000 ms256 MBSolved by 0%
A student record holds a roll number, a name with no spaces, and three marks.
Read one record — the roll number and name on the first line, the three marks on the second — then print the roll number, the name, the total and the average rounded down, separated by single spaces on one line.
Constraints - `1 ≤ roll ≤ 1000000` - Name is 1 to 30 letters, no spaces. - `0 ≤ each mark ≤ 100`
Input
The first line contains a roll number and a name, separated by a space. The second line contains three integers — the marks.
Output
Print the roll number, the name, the total and the average rounded DOWN, on one line separated by single spaces.
Input101 Aravind
80 75 90
Output101 Aravind 245 81
Notehas a total that does not divide evenly by three
Input7 Divya
90 90 90
Output7 Divya 270 90
Notehas three identical marks, so the average is exact
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution