//100,0000,0000,0000〜10,0000,0000,0000,0000,0000
let score1 = 0;
//1000,0000〜100,0000,0000,0000
let score2 = 0;
//0〜1000,0000
let score3 = 0;

//スコアを区切る桁数
let scoreexp = 10 ^ 7;

/**
 * 独自スコアの管理
 */
task UserScoreTask(){
	let systemscore = 0;
	let tmp_score = 0;
	let tmp_score1 = 0;
	let tmp_score2 = 0;
	let tmp_score3 = 0;
	
	loop{
		//デフォルトのスコア値を取得した後0に
		systemscore = GetScore();
		AddScore( -systemscore );
		
		tmp_score = systemscore * GetScorePoint();
		tmp_score3 = tmp_score % scoreexp;
		tmp_score = truncate( tmp_score / scoreexp );
		tmp_score2 = tmp_score % scoreexp;
		tmp_score = truncate( tmp_score / scoreexp );
		tmp_score1 = tmp_score;
		
		score1 += tmp_score1;
		score2 += tmp_score2;
		score3 += truncate( tmp_score3 / 10 ) * 10;
		
		//score3の繰り上がり
		if( score3 > scoreexp ){
			score2 += 1;
			score3 -= scoreexp;
		}
		
		//score2の繰り上がり
		if( score2 > scoreexp ){
			score1 += 1;
			score2 -= scoreexp;
		}
		
		yield;
	}
}