Skip to content

Instantly share code, notes, and snippets.

View lunandd's full-sized avatar
🕳️

Pavlos Efstathiou lunandd

🕳️
View GitHub Profile
package com.pavlos.efstathiou.genid
import android.os.Build
import androidx.annotation.RequiresApi
import java.io.BufferedReader
import java.io.File
import java.nio.file.Files
import java.nio.file.StandardOpenOption
import java.lang.IllegalArgumentException
@lunandd
lunandd / season.kt
Last active November 30, 2020 12:30
package com.pavlos.efstathiou.seasons
/********************
How to run:
Prerequisites: Have Java installed and the Kotlin compiler
First, execute this command: kotlinc seasons.kt -include-runtime -d seasons.jar
Then this: java -jar seasons.jar
********************/
fun readInts() = readLine()!!.split(' ').map { it.toInt() } // Stolen from https://stackoverflow.com/questions/41283393/reading-console-input-in-kotlin
fun main() {