Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Numerics;
- using System.Linq;
- namespace CatchTheTheif
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Console.WriteLine(long.MinValue);
- string idThief = Console.ReadLine();
- var num = int.Parse(Console.ReadLine());
- BigInteger max = 0;
- if (idThief == "sbyte")
- {
- max = sbyte.MaxValue;
- }
- if (idThief == "int")
- {
- max = int.MaxValue;
- }
- if (idThief == "long")
- {
- max = long.MaxValue;
- }
- long t = long.MinValue;
- for (int i = 1; i <= num; i++)
- {
- long countIds = long.Parse(Console.ReadLine());
- if (max < countIds)
- {
- continue;
- }
- if (countIds>t)
- {
- t = countIds;
- }
- }
- Console.WriteLine(t);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement