beefrice's blog

By beefrice, history, 7 years ago, In Russian

include<stdio.h>

int main() { int t, a, b, c; scanf("%d", &t); while(t--) { char d = 97; scanf("%d %d %d", &a, &b, &c); if(b == c) { for(int i = 0; i < a; i++) { printf("%c", d); d++; if(d == 123) d = 97; } printf("\n"); } else { for(int i = 0; i < a; i++) { printf("%c", d); if(c > 1) { d++,c--; } } printf("\n"); } } return 0; } [problem:B. Construct the String][problem:B. Construct the String]

  • Vote: I like it
  • 0
  • Vote: I do not like it