注意接收字符时缓冲区的换行要接受掉

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    n *= 4;

    while(n--) {
        char topics, ans;
        scanf(" %c-%c", &topics, &ans);
        if (ans == 'T')
            printf("%d", topics - 'A' + 1);
    }
    return 0;
}

相关文章:

  • 2022-12-23
  • 2021-09-07
  • 2022-01-09
  • 2021-09-29
  • 2022-01-15
  • 2021-04-07
  • 2021-10-16
  • 2022-12-23
猜你喜欢
  • 2021-06-17
  • 2021-09-14
  • 2021-05-23
  • 2021-05-22
  • 2021-08-23
相关资源
相似解决方案