SHARE
TWEET

Untitled

a guest Sep 16th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.example.codeforces
  2.  
  3. fun main(args: Array<String>) {
  4.     val (n, k) = readLine()!!.split(' ').map(String::toInt)
  5.     var result = n
  6.     for (i in 0 until k) {
  7.         result = if (result % 10 != 0) result - 1 else result / 10
  8.     }
  9.     println(result)
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top