Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Numerics;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int shutWebsites = int.Parse(Console.ReadLine());
- int securityKey = int.Parse(Console.ReadLine());
- decimal siteLoss = 0.0m;
- var tokens = shutWebsites* securityKey;
- for (int i = 0; i < shutWebsites; i++)
- {
- string[] websites = Console.ReadLine().Split();
- string siteName = websites[0];
- decimal siteVisits = decimal.Parse(websites[1]);
- decimal siteComercialPricePerVisit = decimal.Parse(websites[2]);
- siteLoss =siteLoss + (siteVisits * siteComercialPricePerVisit);
- Console.WriteLine(siteName);
- if (i==shutWebsites-1)
- {
- Console.WriteLine($"Total Loss: {siteLoss:f20}");
- Console.WriteLine($"Security Token: {BigInteger.Pow(securityKey,shutWebsites)} ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement