Salve, mi amice.
Et tu quidem de lapis philosophorum. Barba non facit philosophum. Labor omnia vincit. Non potest creatio ex nihilo. Necesse est partibus.
Rp:
I Aqua Fortis
I Aqua Regia
II Amalgama
VII Minium
IV Vitriol
Misce in vitro et æstus, et nil admirari. Festina lente, et nulla tenaci invia est via.
Fac et spera,
Vale,
Nicolas Flamel
Input
The first line of input contains several space-separated integers a i (0 ≤ a i ≤ 100).
Output
Print a single integer.
Examples
input
2 4 6 8 10
output
1
Solution:
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>
using namespace std;
int main() {
int a, b, c, d, e;
scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
a /= 1;
b /= 1;
c /= 2;
d /= 7;
e /= 4;
if (b < a) a = b;
if (c < a) a = c;
if (d < a) a = d;
if (e < a) a = e;
printf("%d\n", a);
return 0;
}
Related posts:
The Values You Can Make
Reposts
Prefix-Suffix Palindrome (Hard version)
Wilbur and Swimming Pool
Balls and Boxes
Leaf Partition
Maximum Waterfall
Helping People
Close Vertices
Two Sets
Breaking Good
New Year and Hurry
Distributed Join
Gambling Nim
New Year and Domino
Monopole Magnets
Check if point belongs to the convex polygon in $O(\log N)$
Ilya and a Colorful Walk
Letters and Question Marks
Teams
Molly's Chemicals
Tricky Interactor
Depth First Search
Deleting from a data structure in $O(T(n)\log n)$
Finding the rank of a matrix
Vanya and Computer Game
LRU
Dijkstra on sparse graphs
Gena and Second Distance
Photo to Remember
Nastya and Unexpected Guest
Suns and Rays