10000 Novos problemas · brenonf/Beecrowd-URI-Solutions@da6bd36 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Novos problemas
Browse files Browse the repository at this point in the history
  • Loading branch information
brenonf committed Jun 30, 2024
1 parent 8ea7776 commit da6bd36
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
32 changes: 32 additions & 0 deletions CSharp/1150.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;

class URI
{
static void Main()
{
int x = int.Parse(Console.ReadLine());
int z = x - 1;

int i = 2;
int soma = x;
int s = 1;

while (z <= x)
{
z = int.Parse(Console.ReadLine());
}

while (soma <= z)
{
soma+= + x + s;

if (soma <= z)
{
i = i + 1;
s = s + 1;
}
}

Console.WriteLine(i);
}
}
19 changes: 19 additions & 0 deletions CSharp/1156.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Globalization;

class URI
{
static void Main()
{
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
decimal soma =1;
int x=2;

for(int i =3;i<40;i+=2)
{
soma+=(decimal)i/x;
x*=2;
}
Console.WriteLine($"{soma:F2}");
}
}
33 changes: 33 additions & 0 deletions CSharp/1187.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Globalization;
using System.Linq;
using System.Collections.Generic;

class URI
{
static void Main()
{
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
char c = char.Parse(Console.ReadLine());
int aux =1;
List<decimal> listao = new List<decimal>();

for(int lin =0; lin < 12; lin++)
{
for(int col =0;col<12;col++)
{
if((lin<=4) && (col>=aux) && (col<=11-aux))
{
listao.Add(decimal.Parse(Console.ReadLine()));
}
else{Console.ReadLine();}
}
aux++;
}
if(c=='S')
{
Console.WriteLine($"{listao.Sum():F1}");
}
else{Console.WriteLine($"{listao.Average():F1}");}
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
<p><a href="https://judge.beecrowd.com/pt/profile/265089" target="_blank">Perfil no Beecrowd 🐝</a></p>

<p><a href="https://www.linkedin.com/in/brenonf/" target="_blank">Perfil no Linkedin 💼</a></p>

<hr/>

<img src="https://visitor-badge.laobi.icu/badge?page_id=brenonf/Beecrowd-URI-Solutions&left_color=red&right_color=orange" alt="visitor badge"/>

0 comments on commit da6bd36

Please sign in to comment.
0