結果

問題 No.1009 面積の求め方
ユーザー phsplsphspls
提出日時 2020-03-25 23:31:39
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 2,366 ms
コンパイル使用メモリ 104,620 KB
実行使用メモリ 25,772 KB
最終ジャッジ日時 2023-08-30 11:52:52
合計ジャッジ時間 4,604 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
25,652 KB
testcase_01 AC 64 ms
21,876 KB
testcase_02 AC 67 ms
23,676 KB
testcase_03 AC 66 ms
23,676 KB
testcase_04 AC 64 ms
21,848 KB
testcase_05 AC 64 ms
21,880 KB
testcase_06 AC 67 ms
23,680 KB
testcase_07 AC 67 ms
25,772 KB
testcase_08 AC 66 ms
23,668 KB
testcase_09 AC 67 ms
21,752 KB
testcase_10 AC 68 ms
23,592 KB
testcase_11 AC 67 ms
23,620 KB
testcase_12 AC 68 ms
23,564 KB
testcase_13 AC 68 ms
23,724 KB
testcase_14 AC 69 ms
23,596 KB
testcase_15 AC 67 ms
23,732 KB
testcase_16 AC 67 ms
25,716 KB
testcase_17 AC 66 ms
23,772 KB
testcase_18 AC 67 ms
23,748 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

public class P1009 {
    public static void Main() {
        var ab = Console.ReadLine().Trim().Split(' ').Select(int.Parse).ToList();
        var a = ab[0];
        var b = ab[1];
        var result = (b*b*b - a*a*a) / 3.0 - ((a + b) * (b*b - a*a)) / 2.0 + a*b*(b-a);
        Console.WriteLine(Math.Abs(result));
    }
}
0