結果
問題 | No.63 ポッキーゲーム |
ユーザー | _mi_lin_ |
提出日時 | 2019-04-09 14:52:59 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 939 bytes |
コンパイル時間 | 1,987 ms |
コンパイル使用メモリ | 103,456 KB |
実行使用メモリ | 24,712 KB |
最終ジャッジ日時 | 2023-09-14 15:51:02 |
合計ジャッジ時間 | 4,304 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 56 ms
20,788 KB |
testcase_01 | AC | 56 ms
20,696 KB |
testcase_02 | AC | 62 ms
22,612 KB |
testcase_03 | WA | - |
testcase_04 | AC | 56 ms
22,752 KB |
testcase_05 | AC | 62 ms
22,728 KB |
testcase_06 | AC | 62 ms
20,652 KB |
testcase_07 | WA | - |
testcase_08 | AC | 63 ms
22,792 KB |
testcase_09 | AC | 63 ms
24,712 KB |
testcase_10 | AC | 62 ms
22,584 KB |
testcase_11 | AC | 62 ms
24,712 KB |
testcase_12 | AC | 61 ms
22,704 KB |
testcase_13 | AC | 62 ms
24,700 KB |
testcase_14 | WA | - |
testcase_15 | AC | 62 ms
22,648 KB |
testcase_16 | AC | 62 ms
22,844 KB |
testcase_17 | AC | 63 ms
22,640 KB |
testcase_18 | AC | 62 ms
22,664 KB |
testcase_19 | AC | 63 ms
22,644 KB |
testcase_20 | AC | 64 ms
24,700 KB |
testcase_21 | WA | - |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace No63Pokkey { class Program { static void Main(string[] args) { //整数の入力 string[] number = Console.ReadLine().Split(' '); int L = int.Parse(number[0]); int K = int.Parse(number[1]); //L/2が余る場合 double ans = 0; if (L % 2 != 0) { ans = K * ((L / K) / 2); } //L/2が余らない場合 else if (L % 2 == 0) { ans = (K * ((L / K) / 2)) - K; } //表示 if(ans <= 0) { Console.WriteLine("0"); } else { Console.WriteLine(Math.Floor(ans)); } } } }