提交记录 #197
提交时间:2024-11-12 18:58:43
语言:c
状态:Accepted
编译情况:编译成功
固定测试点#1:
固定测试点#2:
固定测试点#3:
固定测试点#4:
额外测试点#4800:
37【字符】自编车号
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int panduan(const char* plate)
{
int zifu = 0;
int length = strlen(plate);
for (int i = 0; i < length ; i++ )
{
if (isalpha(plate[i]))
{
char c = plate[i];
if (c != 'I' && c != 'O')
{
zifu++;
}
if(c =='I'||c =='O')
{
return 0;
}
}
}
if (zifu < 2)
{
return 0;
}
return 1;
}
int main() {
char number[256];
if (scanf("%s", number) == 1)
{
if (panduan(number)&&isdigit(number[4]))
{
printf("ok.\n");
}
else
{
printf("no.\n");
}
}
return 0;
}