結果

問題 No.538 N.G.S.
ユーザー 💕💖💞
提出日時 2017-07-01 07:17:03
言語 Kotlin
(2.1.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 11,204 ms
コンパイル使用メモリ 434,036 KB
実行使用メモリ 57,056 KB
最終ジャッジ日時 2024-11-20 10:54:03
合計ジャッジ時間 30,697 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 37 WA * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.toInt() }
  // c = n * b + d
  // b = n * a + d
  val n = (c - b) / (b - a).toDouble() 
  val d = c - n * b
  println("${(n*c + d).toInt()}")
}
0