結果

問題 No.63 ポッキーゲーム
ユーザー chankou0920chankou0920
提出日時 2017-10-01 15:19:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 784 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 2,631 ms
コンパイル使用メモリ 95,404 KB
実行使用メモリ 14,716 KB
最終ジャッジ日時 2023-08-25 19:44:07
合計ジャッジ時間 7,247 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
14,640 KB
testcase_01 AC 55 ms
14,628 KB
testcase_02 AC 54 ms
14,636 KB
testcase_03 AC 54 ms
14,572 KB
testcase_04 AC 54 ms
14,716 KB
testcase_05 AC 55 ms
14,616 KB
testcase_06 AC 55 ms
14,616 KB
testcase_07 AC 55 ms
14,616 KB
testcase_08 AC 56 ms
14,620 KB
testcase_09 AC 56 ms
14,620 KB
testcase_10 AC 63 ms
14,624 KB
testcase_11 AC 781 ms
14,592 KB
testcase_12 AC 68 ms
14,716 KB
testcase_13 AC 784 ms
14,520 KB
testcase_14 AC 70 ms
14,624 KB
testcase_15 AC 70 ms
14,612 KB
testcase_16 AC 57 ms
14,656 KB
testcase_17 AC 748 ms
14,648 KB
testcase_18 AC 59 ms
14,548 KB
testcase_19 AC 156 ms
14,604 KB
testcase_20 AC 69 ms
14,540 KB
testcase_21 AC 88 ms
14,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
	public static void Main(string[] args) {
		string[] s = Console.ReadLine().Split(' ');
		long l = long.Parse(s[0]);
		int k = int.Parse(s[1]);
		int len = 0;
		while (l > 0) {
			if (l - k * 2 > 0) {
				len += k;
			}
			l -= k * 2;
		}
		Console.WriteLine(len);
	}
}
0