結果
| 問題 |
No.1229 ラグビーの得点パターン
|
| コンテスト | |
| ユーザー |
rutilicus
|
| 提出日時 | 2020-09-19 21:18:43 |
| 言語 | Kotlin (2.1.0) |
| 結果 |
AC
|
| 実行時間 | 303 ms / 2,000 ms |
| コード長 | 425 bytes |
| コンパイル時間 | 12,171 ms |
| コンパイル使用メモリ | 428,124 KB |
| 実行使用メモリ | 57,192 KB |
| 最終ジャッジ日時 | 2024-06-23 18:51:36 |
| 合計ジャッジ時間 | 22,356 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
コンパイルメッセージ
Main.kt:18:13: warning: 'appendln(Int): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator.
builder.appendln(ans)
^
ソースコード
fun main() {
val builder = StringBuilder()
val n = readInputLine().toInt()
var ans = 0
for (p in 0..100) {
for (t in 0..100) {
for (g in 0..t) {
if (p * 3 + t * 5 + g * 2 == n) {
ans++
}
}
}
}
builder.appendln(ans)
print(builder.toString())
}
fun readInputLine(): String {
return readLine()!!
}
rutilicus