Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Numerics;
  7.  
  8. namespace ConsoleApp1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int shutWebsites = int.Parse(Console.ReadLine());
  15. int securityKey = int.Parse(Console.ReadLine());
  16. decimal siteLoss = 0.0m;
  17. var tokens = shutWebsites* securityKey;
  18. for (int i = 0; i < shutWebsites; i++)
  19. {
  20. string[] websites = Console.ReadLine().Split();
  21. string siteName = websites[0];
  22. decimal siteVisits = decimal.Parse(websites[1]);
  23. decimal siteComercialPricePerVisit = decimal.Parse(websites[2]);
  24.  
  25. siteLoss =siteLoss + (siteVisits * siteComercialPricePerVisit);
  26. Console.WriteLine(siteName);
  27. if (i==shutWebsites-1)
  28. {
  29. Console.WriteLine($"Total Loss: {siteLoss:f20}");
  30. Console.WriteLine($"Security Token: {BigInteger.Pow(securityKey,shutWebsites)} ");
  31. }
  32.  
  33. }
  34.  
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement