結果
問題 |
No.51 やる気の問題
|
ユーザー |
|
提出日時 | 2018-11-23 13:05:01 |
言語 | Kotlin (2.1.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 8,846 ms |
コンパイル使用メモリ | 423,756 KB |
実行使用メモリ | 54,544 KB |
最終ジャッジ日時 | 2024-11-20 17:09:47 |
合計ジャッジ時間 | 15,747 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 10 |
コンパイルメッセージ
Main.kt:4:10: warning: parameter 'args' is never used fun main(args: Array<String>) { ^
ソースコード
/** * Created by karayuu on 2018/11/23 */ fun main(args: Array<String>) { var w = readLine()!!.toDouble() var d = readLine()!!.toInt() var motivation: Double = 0.0 while (d >= 1) { motivation = w / (d * d) w -= Math.floor(motivation) d-- } println(Math.floor(motivation).toInt()) }