結果

問題 No.63 ポッキーゲーム
ユーザー kuuso1kuuso1
提出日時 2014-11-11 23:26:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 634 ms / 5,000 ms
コード長 1,012 bytes
コンパイル時間 2,121 ms
コンパイル使用メモリ 104,360 KB
実行使用メモリ 22,796 KB
最終ジャッジ日時 2023-08-25 18:43:47
合計ジャッジ時間 6,393 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,696 KB
testcase_01 AC 52 ms
18,732 KB
testcase_02 AC 53 ms
20,716 KB
testcase_03 AC 54 ms
20,840 KB
testcase_04 AC 54 ms
20,824 KB
testcase_05 AC 53 ms
20,708 KB
testcase_06 AC 54 ms
22,672 KB
testcase_07 AC 53 ms
20,800 KB
testcase_08 AC 51 ms
20,716 KB
testcase_09 AC 52 ms
20,636 KB
testcase_10 AC 57 ms
20,824 KB
testcase_11 AC 634 ms
22,796 KB
testcase_12 AC 67 ms
22,748 KB
testcase_13 AC 623 ms
18,780 KB
testcase_14 AC 65 ms
20,780 KB
testcase_15 AC 66 ms
22,788 KB
testcase_16 AC 58 ms
20,788 KB
testcase_17 AC 585 ms
20,824 KB
testcase_18 AC 56 ms
20,648 KB
testcase_19 AC 140 ms
20,736 KB
testcase_20 AC 60 ms
20,768 KB
testcase_21 AC 79 ms
18,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;
using System.Collections;
using System.Collections.Generic;
 
class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		var d=ria();
		int L=d[0];int K=d[1];
		
		int cnt=0;
		while(true){
			if(L-2*K>0){
				cnt++;
				L-=2*K;
				continue;
			}
			break;
		}
		
		Console.WriteLine(K*cnt);
		
	}

	public Sol(){
	}




	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}
0