31 lines
778 B
C#
31 lines
778 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Admin.NET.Core;
|
|
public class CWBUtil
|
|
{
|
|
|
|
/// <summary>
|
|
///冲稳保转换值
|
|
/// </summary>
|
|
/// <param name="Count"></param>
|
|
/// <param name="ItemCount"></param>
|
|
/// <returns></returns>
|
|
public static Tuple<int, int, int> ChangeVal(int Count, int ItemCount)
|
|
{
|
|
int totalVolunteers = Count * ItemCount;
|
|
// 计算冲、稳、保的数量
|
|
int rushCount = (int)(totalVolunteers * 0.25);
|
|
int stableCount = (int)(totalVolunteers * 0.43);
|
|
int safeCount = totalVolunteers - rushCount - stableCount;
|
|
|
|
return new Tuple<int, int, int>(rushCount, stableCount, safeCount);
|
|
}
|
|
|
|
|
|
|
|
}
|