leetcode984】的更多相关文章

Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and exactly B 'b' letters; The substring 'aaa' does not occur in S; The substring 'bbb' does not occur in S. Example 1: Input: A = 1, B…
public class Solution { private string M1(int A, int B) { StringBuilder sb = new StringBuilder(); ; ; int temp = groupA; int distance = B - groupA; ; i < groupA; i++) { ) { sb.Append("AA"); && B > ) { sb.Append("BB"); B =…