結果

問題 No.1415 100の倍数かつ正整数(1)
ユーザー 👑 yumechiyumechi
提出日時 2021-03-07 05:37:36
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 926 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 9,869 ms
コンパイル使用メモリ 252,572 KB
実行使用メモリ 63,544 KB
最終ジャッジ日時 2024-04-17 08:16:26
合計ジャッジ時間 31,819 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 904 ms
63,488 KB
testcase_01 AC 890 ms
63,488 KB
testcase_02 AC 888 ms
63,332 KB
testcase_03 AC 880 ms
63,416 KB
testcase_04 AC 915 ms
63,296 KB
testcase_05 AC 908 ms
63,224 KB
testcase_06 AC 901 ms
63,448 KB
testcase_07 AC 926 ms
63,312 KB
testcase_08 AC 879 ms
63,532 KB
testcase_09 AC 891 ms
63,044 KB
testcase_10 AC 889 ms
63,248 KB
testcase_11 AC 888 ms
63,540 KB
testcase_12 AC 877 ms
63,412 KB
testcase_13 AC 893 ms
63,468 KB
testcase_14 AC 870 ms
63,156 KB
testcase_15 AC 875 ms
63,428 KB
testcase_16 AC 902 ms
63,316 KB
testcase_17 AC 885 ms
63,440 KB
testcase_18 AC 899 ms
63,252 KB
testcase_19 AC 892 ms
63,288 KB
testcase_20 AC 909 ms
63,544 KB
testcase_21 AC 894 ms
63,124 KB
testcase_22 AC 894 ms
63,208 KB
testcase_23 AC 891 ms
63,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  def solve(n: String): String = {
    if(n.startsWith("-") || n.length < 3){
      "0"
    } else {
      n.substring(0, n.length - 2)
    }
  }

  val n = sc.next
  print(solve(n))
}
0