結果
問題 | No.63 ポッキーゲーム |
ユーザー | ototonari |
提出日時 | 2017-03-16 21:47:22 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 876 bytes |
コンパイル時間 | 2,018 ms |
コンパイル使用メモリ | 101,568 KB |
実行使用メモリ | 24,800 KB |
最終ジャッジ日時 | 2023-09-17 05:22:52 |
合計ジャッジ時間 | 6,736 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 58 ms
20,772 KB |
testcase_01 | AC | 58 ms
20,720 KB |
testcase_02 | AC | 58 ms
20,808 KB |
testcase_03 | AC | 59 ms
18,784 KB |
testcase_04 | WA | - |
testcase_05 | AC | 58 ms
20,708 KB |
testcase_06 | AC | 59 ms
20,660 KB |
testcase_07 | AC | 60 ms
20,744 KB |
testcase_08 | AC | 60 ms
22,860 KB |
testcase_09 | AC | 59 ms
20,812 KB |
testcase_10 | AC | 67 ms
20,652 KB |
testcase_11 | AC | 820 ms
20,700 KB |
testcase_12 | AC | 76 ms
22,888 KB |
testcase_13 | WA | - |
testcase_14 | AC | 75 ms
20,748 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 92 ms
20,900 KB |
コンパイルメッセージ
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 yukicoder { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string[] t = s.Split(' '); int L = int.Parse(t[0]); int K = int.Parse(t[1]); int haruka = 0; int c = L; while(0 < c) { if(c - (K * 2) < 0) { haruka += c; c = 0; } else { c -= (K * 2); haruka += K; } } Console.WriteLine("{0}", (L - haruka)); //Console.ReadLine(); } } }