public class AUGFireRateOptimizer {
  
  public static void main(String[] args) {

    int baseBulletDamage = 40; 
    double fireRate = 8.0; 
    

    double maxFireRate = calculateMaxFireRate(baseBulletDamage, fireRate);
    
    System.out.println("The rapid fire of the AUG is maximized to：" + maxFireRate + " 100 times/0.1m/s");
  }
  
  private static double calculateMaxFireRate(int baseBulletDamage, double fireRate) {
    double maxFireRate = 0.0;
    

    for (double i = 0.1; i <= fireRate; i += 0.1) {

      double shotsPerSecond = i;
      

      double damagePerSecond = baseBulletDamage * shotsPerSecond;
      
      if (damagePerSecond > maxDamage) {
        maxDamage = damagePerSecond;
      }
    }
    
    return maxFireRate;
  }
}
