結果

問題 No.1089 三変数方程式
ユーザー 👑 yumechiyumechi
提出日時 2021-03-01 23:52:53
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,093 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 8,565 ms
コンパイル使用メモリ 271,616 KB
実行使用メモリ 65,724 KB
最終ジャッジ日時 2024-04-14 04:03:42
合計ジャッジ時間 27,802 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 945 ms
65,640 KB
testcase_01 AC 943 ms
65,468 KB
testcase_02 AC 981 ms
65,496 KB
testcase_03 AC 1,059 ms
65,464 KB
testcase_04 AC 1,009 ms
65,432 KB
testcase_05 AC 1,093 ms
65,432 KB
testcase_06 AC 1,025 ms
65,676 KB
testcase_07 AC 1,018 ms
65,584 KB
testcase_08 AC 1,080 ms
65,708 KB
testcase_09 AC 1,000 ms
65,716 KB
testcase_10 AC 1,066 ms
65,508 KB
testcase_11 AC 1,031 ms
65,436 KB
testcase_12 AC 1,059 ms
65,664 KB
testcase_13 AC 1,025 ms
65,384 KB
testcase_14 AC 1,067 ms
65,568 KB
testcase_15 AC 1,073 ms
65,692 KB
testcase_16 AC 1,053 ms
65,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

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

  val n = sc.nextInt
  println((0 to n).toList.map(i => (0 to (n - i)).toList.count(j => n - i - j >= 0)).sum)
}
0