SHARE
TWEET

buckets

roronoa Apr 25th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         // IT JUST WORKS ...//
  2. import java.util.*;
  3. import java.io.*;
  4. import java.math.*;
  5. class Solution {
  6.  
  7.     public static void main(String args[])
  8.     {
  9.         Scanner in = new Scanner(System.in);
  10.         int n = in.nextInt();
  11.         int d = in.nextInt();
  12.         int s = in.nextInt();
  13.         int t = 0;
  14.         int max = n%2==0?n/2:n/2+1;
  15.         for(int i = 1; i <= max; i++)
  16.         {
  17.             t = t + (n/2)*d*s;
  18.         }
  19.  
  20.         System.out.println(t);
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top