Skip to content

Instantly share code, notes, and snippets.

@anakaiti
Created September 6, 2016 16:16
Show Gist options
  • Save anakaiti/09809ac074ba3779d5dbc7d6ce17246d to your computer and use it in GitHub Desktop.
Save anakaiti/09809ac074ba3779d5dbc7d6ce17246d to your computer and use it in GitHub Desktop.
Problem - 2 - Random Number
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int input=Integer.parseInt(reader.readLine());
input--; //kill me QAQ
String output="0";
for (int i=1;i<=input;i++)
{
output += " ";
output += i;
}
System.out.println(output);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment