結果
| 問題 | No.188 HAPPY DAY | 
| コンテスト | |
| ユーザー |  rutilicus | 
| 提出日時 | 2020-08-30 21:03:00 | 
| 言語 | Kotlin (2.1.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 405 ms / 1,000 ms | 
| コード長 | 546 bytes | 
| コンパイル時間 | 10,649 ms | 
| コンパイル使用メモリ | 426,928 KB | 
| 実行使用メモリ | 57,948 KB | 
| 最終ジャッジ日時 | 2024-11-15 15:26:57 | 
| 合計ジャッジ時間 | 11,941 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 1 | 
コンパイルメッセージ
Main.kt:21: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)
            ^
            
            ソースコード
import java.util.*
fun main() {
    val builder = StringBuilder()
    var ans = 0
    val currentDay = GregorianCalendar(2015, 0, 1)
    while (currentDay.get(Calendar.YEAR) == 2015) {
        val month = currentDay.get(Calendar.MONTH) + 1
        val day = currentDay.get(Calendar.DAY_OF_MONTH)
        if (month == day / 10 + day % 10) {
            ans++
        }
        currentDay.add(Calendar.DAY_OF_MONTH, 1)
    }
    builder.appendln(ans)
    print(builder.toString())
}
fun readInputLine(): String {
    return readLine()!!
}
            
            
            
        