From 67226fa3b9e05394694c27a5c8e3e032656163c4 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Wed, 29 May 2019 20:17:40 +0200 Subject: Resuelto 368 en c++: Cociendo huevos. --- c/las12uvas/368_cociendoHuevos.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 c/las12uvas/368_cociendoHuevos.cpp (limited to 'c/las12uvas') diff --git a/c/las12uvas/368_cociendoHuevos.cpp b/c/las12uvas/368_cociendoHuevos.cpp new file mode 100644 index 0000000..47564ea --- /dev/null +++ b/c/las12uvas/368_cociendoHuevos.cpp @@ -0,0 +1,13 @@ +#include + +using namespace std; + +int main() { + int eggs, size; + cin >> eggs; + while (eggs != 0) { + cin >> size; + cout << (eggs/size + (eggs%size != 0)) * 10 << endl; + cin >> eggs; + } +} -- cgit v1.2.1