#10724: 為何會"WA"?


d2513850 (林勇智)

學校 : 崑山科技大學
編號 : 5102
來源 : [114.140.80.239]
最後登入時間 :
2024-12-03 11:08:59
d337. 中国字 -- liouzhou_101 | From: [111.184.240.245] | 發表日期 : 2016-02-24 22:17

#include<stdio.h>
#include<wchar.h>
#include<stdlib.h>
#include<locale.h>
int main (void){
    wchar_t myString2[16384];
    int a;
    setlocale(LC_ALL,"");
    while(wscanf(L"%ls",myString2)!=EOF){
        for(a=0;a<wcslen(myString2);a++){
            if(13312<=myString2[a]&&myString2[a]<=19893){
                wprintf(L"%lc",myString2[a]);
            }else if(19968<=myString2[a]&&myString2[a]<=40908){
                wprintf(L"%lc",myString2[a]);
            }else if(63744<=myString2[a]&&myString2[a]<=64217){
                wprintf(L"%lc",myString2[a]);
            }else if(131072<=myString2[a]&&myString2[a]<=173782){
                wprintf(L"%lc",myString2[a]);
            }else if(173824<=myString2[a]&&myString2[a]<=177972){
                wprintf(L"%lc",myString2[a]);
            }else if(177984<=myString2[a]&&myString2[a]<=178205){
                wprintf(L"%lc",myString2[a]);
            }else if(178208<=myString2[a]&&myString2[a]<=183969){
                wprintf(L"%lc",myString2[a]);
            }else if(194560<=myString2[a]&&myString2[a]<=195101){
                wprintf(L"%lc",myString2[a]);
            }
        }
        wprintf(L"\n");
    }
    return 0;
}

就是錯在第1行,應該輸出"适合所有中学生及初学者的系统",但我的程式會輸出"适合所有中学生及初学者的",就是少"系统"2字

 
ZeroJudge Forum