結果
問題 | No.63 ポッキーゲーム |
ユーザー | _mi_lin_ |
提出日時 | 2019-04-09 14:51:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 939 bytes |
コンパイル時間 | 3,687 ms |
コンパイル使用メモリ | 103,076 KB |
実行使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2023-09-14 15:50:47 |
合計ジャッジ時間 | 6,428 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 55 ms
22,896 KB |
testcase_01 | AC | 55 ms
20,848 KB |
testcase_02 | WA | - |
testcase_03 | AC | 61 ms
22,724 KB |
testcase_04 | AC | 54 ms
22,708 KB |
testcase_05 | AC | 61 ms
22,796 KB |
testcase_06 | AC | 61 ms
22,720 KB |
testcase_07 | AC | 61 ms
22,696 KB |
testcase_08 | AC | 61 ms
20,720 KB |
testcase_09 | WA | - |
testcase_10 | AC | 60 ms
22,680 KB |
testcase_11 | WA | - |
testcase_12 | AC | 62 ms
24,832 KB |
testcase_13 | AC | 62 ms
24,684 KB |
testcase_14 | AC | 62 ms
24,720 KB |
testcase_15 | AC | 61 ms
22,748 KB |
testcase_16 | AC | 62 ms
22,656 KB |
testcase_17 | AC | 60 ms
22,588 KB |
testcase_18 | AC | 62 ms
24,776 KB |
testcase_19 | AC | 62 ms
22,664 KB |
testcase_20 | AC | 61 ms
22,724 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/Kが余る場合 double ans = 0; if (L % K != 0) { ans = K * ((L / K) / 2); } //L/Kが余らない場合 else if (L % K == 0) { ans = (K * ((L / K) / 2)) - K; } //表示 if(ans <= 0) { Console.WriteLine("0"); } else { Console.WriteLine(Math.Floor(ans)); } } } }