結果

問題 No.538 N.G.S.
ユーザー 💕💖💞
提出日時 2017-07-08 13:56:03
言語 Kotlin
(2.1.0)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 12,443 ms
コンパイル使用メモリ 431,580 KB
実行使用メモリ 56,972 KB
最終ジャッジ日時 2024-11-20 11:30:45
合計ジャッジ時間 32,596 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 47 WA * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:11: warning: parameter 'args' is never used
fun main( args : Array<String> ) {
          ^

ソースコード

diff #

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("${(n*c + d).toLong()}")
}
0