結果

問題 No.249 N言っちゃダメゲーム (2)
ユーザー kuuso1kuuso1
提出日時 2015-07-24 23:08:54
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 1,018 bytes
コンパイル時間 4,419 ms
コンパイル使用メモリ 106,892 KB
実行使用メモリ 20,900 KB
最終ジャッジ日時 2023-09-22 22:52:58
合計ジャッジ時間 3,137 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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(){
		int turn=0;
		int[] Player=new int[2];
		for(int i=0;i<1000;i++){
			var d=rla();
			if((d[0]-1)%(d[1]+1)==0){
				Player[turn^1]++;
				turn^=1;
			}else{
				Player[turn]++;
			}
		}
		Console.WriteLine(Player[0]);
		
		
		
	}

	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