結果
| 問題 | No.604 誕生日のお小遣い | 
| コンテスト | |
| ユーザー |  💕💖💞 | 
| 提出日時 | 2018-02-16 03:02:27 | 
| 言語 | Kotlin (2.1.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 312 ms / 1,000 ms | 
| コード長 | 257 bytes | 
| コンパイル時間 | 13,709 ms | 
| コンパイル使用メモリ | 435,644 KB | 
| 実行使用メモリ | 55,192 KB | 
| 最終ジャッジ日時 | 2024-11-21 19:23:31 | 
| 合計ジャッジ時間 | 21,262 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 | 
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^
Main.kt:6:74: warning: unnecessary non-null assertion (!!) on a non-null receiver of type Long
  val last = listOf(cycle, obj - (obj/batch)*(cycle + income - 1) ).min()!!
                                                                         ^
            
            ソースコード
fun main(args:Array<String>) {
  val (cycle, income, obj) = readLine()!!.split(" ").map { it.toLong() }
  val batch = income + cycle - 1
  
  val last = listOf(cycle, obj - (obj/batch)*(cycle + income - 1) ).min()!!
  println( cycle*(obj/batch) + last ) 
}
            
            
            
        