Skip to content

Instantly share code, notes, and snippets.

@thecoducer
Created July 17, 2020 07:55
Show Gist options
  • Save thecoducer/4e03335e9f9eb3de4a1c7e851ee0f0ad to your computer and use it in GitHub Desktop.
Save thecoducer/4e03335e9f9eb3de4a1c7e851ee0f0ad to your computer and use it in GitHub Desktop.
import java.util.*;
class Solution {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int result = 0;
if(n % 2 == 0) {
for(int i=0;i<(n/2)-1;i++){
result += 275;
}
}
if(n % 2 != 0){
for(int i=0;i<(n/2);i++){
result += 550;
}
}
System.out.println(result);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment