希丰展?用 MD。
by tni_retsigeR @ 2024-03-17 20:55:28
@[YgtVictor](/user/1097584) GPT看不出来的情况多了,就连我这个发过贴感慨GPT强大并不惜与人对线的人也不得不承认
by litjohn @ 2024-03-17 20:57:27
chatgpt何时找出过问题?
by wxzzzz @ 2024-03-17 20:57:37
@[YgtVictor](/user/1097584) 另外你这份代码不能过遍()
by litjohn @ 2024-03-17 20:58:20
```cpp
#include <stdio.h>
#include <math.h>
int main()
{
int s;
char a,b,c,d,e,f,g,h,i,j;
scanf("%c-%c%c%c-%c%c%c%c%c-%c",&a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
s=(a-'0')*1+(b-'0')*2+(c-'0')*3+(d-'0')*4+(e-'0')*5+(f-'0')*6+(g-'0')*7+(h-'0')*8+(i-'0')*9;
int m=s%11;
char ch;
if(m==10)
{
ch='X';
}
else
{
ch= '0'+m;
}
if(ch==j)
{
printf("Right");
}
else
{
printf("%c-%c%c%c-%c%c%c%c%c-%c",a,b,c,d,e,f,g,h,i,ch);
}
return 0;
}
```
by Carey_chen @ 2024-03-17 20:59:46
改了一下,`%d` 会把读到的整个数字读入,而不是一位一位读入
by Carey_chen @ 2024-03-17 21:00:43
@[YgtVictor](/user/1097584)
by Carey_chen @ 2024-03-17 21:01:02
@[YgtVictor](/user/1097584) 你好像过不了样例
by litjohn @ 2024-03-17 21:01:26
@[YgtVictor](/user/1097584) 大佬给的代码对了。
by litjohn @ 2024-03-17 21:02:41
@[Carey_chen](/user/516836) 谢谢谢谢
by YgtVictor @ 2024-03-17 21:08:46