結果

問題 No.538 N.G.S.
ユーザー 💕💖💞
提出日時 2017-07-01 07:19:54
言語 Kotlin
(2.1.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 231 bytes
コンパイル時間 10,960 ms
コンパイル使用メモリ 435,628 KB
実行使用メモリ 57,116 KB
最終ジャッジ日時 2024-11-20 10:56:32
合計ジャッジ時間 27,536 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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