NC14745 Hungry!

本博客通过一则关于一家快餐店和祖孙俩的故事,提出了一道编程题,要求读者理解故事并编写程序根据输入的整数N输出特定字符串,以此来模拟饥饿的感觉。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

题目描述

     XzzF is in English class, His teacher told them a story:

    At noon the rush hour had passed. There were few guests in the snack bar. It was not crowded.

    When the boss was about to take a break to read a newspaper, in came an old lady and a little boy.   

     “How much money is a bowl of beef soup?” the grandma sat down, counted the money in her purse and ordered a bowl of beef soup. The grandma pushed the bowl to the little boy, who swallowed  his saliva , looking at his grandma and saying, "Grandma, did you really have lunch?" "Of course." His grandma chewed  a piece of radish  slowly. 

    Very quickly, the little boy ate up the meal.Seeing this. the boss went over to them and said, "Old lady, congratulations, you are lucky to have the free food, for you are our 100th guest."Afterwards, over a month or more, one day, the small boy squatted  across the snack bar, where he seemed to be counting something, which shocked the boss when he happened to look out office window.When the small boy saw a guest walk into the snack bar, he would put a small stone into the circle he drew, but the lunch time had almost passed, the small stones he put into the circle were hardly 50.The boss was quite worried and called up all his old guests. 

    The guests started coming one after another."81, 82, 83… " the small boy counted faster and faster. At last, when the 99th small stone was put into the circle, the little boy hurried to pull his grandma's hand and went into the snack bar. "Grandma, this time it's on me," the little boy said proudly. The grandma who had become the real 100th guest was served a bowl of beef soup by her grandson. As his grandma as before, the little boy chewed a piece of radish in his mouth.

    oh ! hungry ! This story is useless. You just need to guess the meaning of this problem. (- . -)

输入描述:

The input will be multiple tests, and each line will contain an integer N (1 <= N <= 20).

输出描述:

Just observe the example.

示例1

输入

2
3

输出

gu...gu...
The story is so boring. And I am so hungry!
gu...gu...gu...
The story is so boring. And I am so hungry!

说明

How clear the example !
#include<bits/stdc++.h>
using namespace std;
long long n;
int main()
{
    while(cin>>n)
    {
        for(int i=0;i<n;i++)
        {
            cout<<"gu...";
        }
        cout<<endl;
        cout<<"The story is so boring. And I am so hungry!"<<endl;
    }
    system("pause");
    return 0;
}

PS:做过的最逗的题目了hhh

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一二爱上蜜桃猫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值