2020牛客暑期多校训练营(第三场)L、Problem L is the Only Lovely Problem (签到题)

该博客介绍了一道编程题目,要求判断输入字符串是否以'lovely'开头,忽略大小写。题目非常简单,被视为签到题。
摘要由CSDN通过智能技术生成

题目链接

题面:
在这里插入图片描述

题意:
判断一个字符串是不是以 l o v e l y lovely lovely 开头,忽略大小写。

题解:
签到题。

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<queue>
#include<bitset>
#include<map>
#include<unordered_map>
#include<set>
#define ui unsigned int
#define ll long long
#define llu unsigned ll
#define ld long double
#define pr make_pair
#define pb push_back
#define lc (cnt<<1)
#define rc (cnt<<1|1)
#define tmid ((l+r)>>1)
using namespace std;

const int inf=0x3f3f3f3f;
const ll lnf=0x3f3f3f3f3f3f3f3f;
const double dnf=1e18;
const int mod=998244353;
const double eps=1e-8;
const double pi=acos(-1.0);
const int hp=13331;
const int maxn=100100;
const int maxp=1100;
const int maxm=100100;
const int up=100000;

char str[maxn];

int main(void)
{
    scanf("%s",str+1);
    if((str[1]=='l'||str[1]=='L')&&(str[2]=='o'||str[2]=='O')&&(str[3]=='v'||str[3]=='V')&&(str[4]=='e'||str[4]=='E')&&(str[5]=='l'||str[5]=='L')&&(str[6]=='y'||str[6]=='Y'))
        printf("lovely\n");
    else printf("ugly\n");
    return 0;
}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值