結果

問題 No.722 100×100=1000
ユーザー Pump0129Pump0129
提出日時 2018-08-23 05:44:13
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 622 bytes
コンパイル時間 10,501 ms
コンパイル使用メモリ 428,168 KB
実行使用メモリ 57,096 KB
最終ジャッジ日時 2024-04-20 15:22:31
合計ジャッジ時間 21,167 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 301 ms
56,996 KB
testcase_01 AC 298 ms
56,900 KB
testcase_02 AC 298 ms
57,092 KB
testcase_03 AC 293 ms
56,884 KB
testcase_04 AC 297 ms
56,956 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 299 ms
56,772 KB
testcase_08 AC 284 ms
56,792 KB
testcase_09 AC 299 ms
56,956 KB
testcase_10 AC 286 ms
56,916 KB
testcase_11 AC 288 ms
56,776 KB
testcase_12 AC 288 ms
56,872 KB
testcase_13 AC 287 ms
56,920 KB
testcase_14 AC 289 ms
56,784 KB
testcase_15 AC 291 ms
56,988 KB
testcase_16 AC 296 ms
56,788 KB
testcase_17 AC 299 ms
56,784 KB
testcase_18 AC 296 ms
56,784 KB
testcase_19 AC 300 ms
57,088 KB
testcase_20 AC 292 ms
56,920 KB
testcase_21 WA -
testcase_22 AC 293 ms
57,076 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 293 ms
56,928 KB
testcase_26 AC 287 ms
56,792 KB
testcase_27 AC 290 ms
56,860 KB
testcase_28 AC 287 ms
57,088 KB
testcase_29 AC 286 ms
56,912 KB
testcase_30 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:8:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package net.ipipip0129.kotlin.yukicoder

import kotlin.math.abs
import kotlin.math.pow

fun checkNum(x: Int): Boolean = abs(x) % 10.0.pow(abs(x).toString().length - 1).toInt() == 0

fun main(args: Array<String>) {
    val numList = readLine()!!.split(" ").map { it.toInt() }
    if (checkNum(numList[0]) && checkNum(numList[1])) {
        print(((numList[0].toLong() * numList[1].toLong()) / 10))
    } else {
        val ans = numList[0].toLong() * numList[1].toLong()
        if (-99999999 <= ans && ans <= 99999999) {
            print(ans)
        } else {
            println("E")
        }
    }
}
0