Advertisement
silvana1303

exam submissions

May 22nd, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace exampreparation
  4. {
  5.     class exam
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int students = int.Parse(Console.ReadLine());
  10.             int problems = int.Parse(Console.ReadLine());
  11.  
  12.             double submissions = Math.Ceiling(problems * 2.8);
  13.             double answers = students * submissions;
  14.             double extraAnswers = students * Math.Floor(problems / 3.0);
  15.  
  16.             double allAnswers = answers + extraAnswers;
  17.  
  18.             double memory = 5 * Math.Ceiling(allAnswers / 10);
  19.  
  20.             Console.WriteLine($"{memory} KB needed");
  21.             Console.WriteLine($"{allAnswers} submissions");
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement