結果
問題 |
No.1009 面積の求め方
|
ユーザー |
|
提出日時 | 2020-03-25 23:31:39 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 925 ms |
コンパイル使用メモリ | 113,100 KB |
実行使用メモリ | 28,572 KB |
最終ジャッジ日時 | 2025-01-02 00:19:00 |
合計ジャッジ時間 | 2,024 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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)); } }