Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // IT JUST WORKS ...//
- import java.util.*;
- import java.io.*;
- import java.math.*;
- class Solution {
- public static void main(String args[])
- {
- Scanner in = new Scanner(System.in);
- int n = in.nextInt();
- int d = in.nextInt();
- int s = in.nextInt();
- int t = 0;
- int max = n%2==0?n/2:n/2+1;
- for(int i = 1; i <= max; i++)
- {
- t = t + (n/2)*d*s;
- }
- System.out.println(t);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement