130001 - Code Creator

通过次数

6

提交次数

18

时间限制 : 1 秒
内存限制 : 128 MB

With increased popularity of programming competitions, there are so many online judges where contestants can practice. Usually, most of these sites allow users to submit solutions to problems and if they are accepted, the users total number of solved is increased. To increase competition among users, these sites maintain a ranking of users based on the total number of solves. Unfortunately, this at times has introduced unhealthy competition among some users. A lot of the problems at these sites are collected from external sites, and the online judge uses data file directly from these external sites. This means, for certain problem, one is only required to submit the output file to get a problem accepted, without solving the problem at all. Just out of curiosity, you try to investigate how many of these problems are actually using judge data from the external site. To accelerate your investigation, you want to automate the process of creating codes that will submit judge data only. In this problem, you are required to make such a code generator.

随着编程比赛的日益普及,有很多OJ网站可以供选手练习。通常,大多苏网站允许用户提交解题代码,并且如果代码通过,则解决的题目总数将增加。为了增加用户之间的竞争,这些网站根据解题的总数对用户进行排名。不幸的是,这有时会在用户中引入不良竞争。这些站点的许多问题都是从外部站点收集的,OJ直接使用这些外部站点的数据文件。这意味着,对于某些问题,只需要提交输出文件就可以通过,而根本不需要实际解决问题。出于好奇,你试图调查其中有多少问题实际上是使用外部网站的判断数据。为了加速调查,您需要自动创建只提交判题数据的代码。在这个问题中,您需要制作这样的代码生成器。

输入

对于每个样例,以一个正整数N (N<100)开始。接下来的N行,每一行包含最少1个最多100个字符。输入字符由字母、数字、空格、反斜杠和引号组成。N为0表示输入结束。

输出

每个样例都将以样例编号开头,格式为“Case x:”,其中x是案例编号。

接下来的几行将是一个C代码,在编译和运行时将输出样例提供的输入。由于有很多方法可以编写程序同样的输出,对于这个问题,我们将限制为以下格式。

#include<string.h>
#include<stdio.h>
int main()
{

<case specific lines>
printf("\n");
return 0;

<case specific lines>将包含N行,每行的格式为:printf("< line >\n"); 其中<line>是为对应行输入的输入值。注意,两个引号“”和反斜杠“\”必须用“\”转义,才能由printf显示。

样例

输入

2
"I like to solve"
I do not like to code
1
yeah accepted
0

输出

Case 1:
#include<string.h>
#include<stdio.h>
int main()
{
printf("\"I like to solve\"\n");
printf("I do not like to code\n");
printf("\n");
return 0;
}
Case 2:
#include<string.h>
#include<stdio.h>
int main()
{
printf("yeah accepted\n");
printf("\n");
return 0;
}