fork download
  1. import java.util.*
  2.  
  3. fun main(args: Array<String>) {
  4. val sc = Scanner(System.`in`)
  5.  
  6. val num:Int = sc.nextInt();
  7.  
  8. var i:Int = 1
  9. while(i < num) {
  10.  
  11. if (num % ++i == 0) {
  12. System.out.println(i + " ")
  13. }
  14. }
  15.  
  16.  
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
20
compilation info
JNA Warning: IOException removing temporary files: JNA temporary directory '/tmp' is not writable
prog.kt:12:26: error: none of the following functions can be called with the arguments supplied: 
public final operator fun plus(other: Byte): Int defined in kotlin.Int
public final operator fun plus(other: Double): Double defined in kotlin.Int
public final operator fun plus(other: Float): Float defined in kotlin.Int
public final operator fun plus(other: Int): Int defined in kotlin.Int
public final operator fun plus(other: Long): Long defined in kotlin.Int
public final operator fun plus(other: Short): Int defined in kotlin.Int
			 System.out.println(i + " ")
                         ^
stdout
Standard output is empty