Skip to content

Instantly share code, notes, and snippets.

View BayronVazquez's full-sized avatar
🏠
Working from home

Bayron Jonathan Vazquez BayronVazquez

🏠
Working from home
View GitHub Profile

Goal

In class, Roo goes up to the whiteboard and draws a circle. On the circle, he plots N points. His friend Voo wants to connect all the points with lines, but the marker is running out of ink and he doesn't know if he can! The marker has i millilitres of ink remaining and drawing each line takes x amount of ink out of the marker. If he can connect all the points, print "yes" and how much ink he used. If not, print "no" and how much more ink he needs to draw all the lines. Remember that each point on the circle must be connected to every other point (don't over count though!!!) Source: (https://www.codingame.com)[https://www.codingame.com]

Input

An int N which represents the number of points on the circle, an int i which represents the number of millilitres of ink in the marker, and an int x of millilitres of ink it takes to draw each line.

Output

If he drew all the lines, the statement "yes" followed by how much ink he used. Otherwise, the statement "no" followed by how much more ink he needed t

@BayronVazquez
BayronVazquez / README.md
Last active August 12, 2022 01:56
You need to revive the good old Spongebobmeme!. YoU kNoW wAhT i MeAn! The first letter should be capitalized, the second lower, the third again capitalized,... and so on.

Goal

You need to revive the good old Spongebobmeme!.

YoU kNoW wAhT i MeAn!

The first letter should be capitalized, the second lower, the third again capitalized,... and so on.

Input

The string: input which need to be converted.

@BayronVazquez
BayronVazquez / README.md
Last active August 12, 2022 02:55
Michelle got a job as a teacher at the university. Michelle teaches in the same auditorium with another teacher, but she has forgotten where this auditorium is. Michelle knows how many students she has in the group a and how many auditoriums b in the university, their capacity c and how many students are inside d.

GOAL

Michelle got a job as a teacher at the university. Michelle teaches in the same auditorium with another teacher, but she has forgotten where this auditorium is. Michelle knows how many students she has in the group a and how many auditoriums b in the university, their capacity c and how many students are inside d.

Source: https://www.codingame.com

INPUT

Line 1: An integer number a of students in Michelle's group.

Line 2: An integer number b of auditoriums in the university. Next b lines: Two space separated integers c and d for the capacity each other auditorium and studens are inside