提出 #29444029
ソースコード 拡げる
fun main() {
val X = readLine()!!
val positive = X.first() != '-'
val notZero = X.last() in '1'..'9'
val delta = if(!positive && notZero) -1 else 0
val ans = X.toLong()/10 + delta
println(ans)
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Integer Division |
| ユーザ | YusukeK |
| 言語 | Kotlin (1.3.71) |
| 得点 | 200 |
| コード長 | 227 Byte |
| 結果 | AC |
| 実行時間 | 109 ms |
| メモリ | 35760 KiB |
コンパイルエラー
warning: ATTENTION! This build uses unsafe internal compiler arguments: -XXLanguage:+InlineClasses This mode is not recommended for production use, as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk!
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_max_00.txt, 02_min_00.txt, 03_border_00.txt, 03_border_01.txt, 04_near_zero_00.txt, 04_near_zero_01.txt, 04_near_zero_02.txt, 05_small_00.txt, 05_small_01.txt, 06_random_00.txt, 06_random_01.txt, 07_integer_00.txt, 07_integer_01.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 109 ms | 35580 KiB |
| 00_sample_01.txt | AC | 96 ms | 35372 KiB |
| 00_sample_02.txt | AC | 99 ms | 35628 KiB |
| 00_sample_03.txt | AC | 88 ms | 35472 KiB |
| 00_sample_04.txt | AC | 93 ms | 35512 KiB |
| 01_max_00.txt | AC | 92 ms | 35432 KiB |
| 02_min_00.txt | AC | 95 ms | 35604 KiB |
| 03_border_00.txt | AC | 89 ms | 35760 KiB |
| 03_border_01.txt | AC | 90 ms | 35584 KiB |
| 04_near_zero_00.txt | AC | 92 ms | 35452 KiB |
| 04_near_zero_01.txt | AC | 93 ms | 35496 KiB |
| 04_near_zero_02.txt | AC | 92 ms | 35424 KiB |
| 05_small_00.txt | AC | 87 ms | 35512 KiB |
| 05_small_01.txt | AC | 95 ms | 35740 KiB |
| 06_random_00.txt | AC | 93 ms | 35456 KiB |
| 06_random_01.txt | AC | 90 ms | 35652 KiB |
| 07_integer_00.txt | AC | 94 ms | 35736 KiB |
| 07_integer_01.txt | AC | 94 ms | 35664 KiB |