aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-05-30 09:47:42 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-05-30 09:47:42 +0200
commitae6586851bc078967c311558b1871eaab10bdad3 (patch)
tree7263b5af349bbedb599d36f209982c8d02533d0e /c
parenta2f8291e333ca877ed14897f6894a8f6ace3229e (diff)
downloadAceptaElReto-ae6586851bc078967c311558b1871eaab10bdad3.tar.gz
AceptaElReto-ae6586851bc078967c311558b1871eaab10bdad3.zip
Resuelto 512 en c++: -Problema racista- Döner sospechoso.
Diffstat (limited to 'c')
-rw-r--r--c/512_donerSospechoso.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/c/512_donerSospechoso.cpp b/c/512_donerSospechoso.cpp
new file mode 100644
index 0000000..a8914e4
--- /dev/null
+++ b/c/512_donerSospechoso.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+using namespace std;
+
+int main() {
+ int cases;
+ int rabbit, horse;
+ for (cin >> cases; cases > 0; cases--) {
+ cin >> rabbit;
+ cin >> horse;
+ cout << rabbit*100/(rabbit+horse) << endl;
+ }
+}