結果

問題 No.538 N.G.S.
コンテスト
ユーザー 💕💖💞
提出日時 2017-07-08 13:58:54
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
AC  
実行時間 194 ms / 2,000 ms
コード長 254 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,587 ms
コンパイル使用メモリ 461,088 KB
実行使用メモリ 53,336 KB
最終ジャッジ日時 2026-05-14 14:05:19
合計ジャッジ時間 21,152 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 51
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.lang.Math
fun main( args : Array<String> ) {
  val (a, b, c) = readLine()!!.split(" ").map { it.toLong() }
  // c = n * b + d
  // b = n * a + d
  val n = (c - b) / (b - a).toDouble() 
  val d = c - n * b
  println("${Math.round(n*c + d)}")
}
0