小技巧

adfasfd

afda

afda


adsfa

adfa

afda

adfa

如果前n测试数据为一个执行条件

各一行的后n组测试数据为另一个执行条件

如 : 前n 组测试数据输出00000000

后n组测试数据输出++++++++

#include<stdio.h>
int main()
{
    char str[100];
    while(gets(str)&&str[0])//&&str[0]==str[0]!='0';
        printf("00000000\n");
    while(gets(str))
        printf("++++++++\n");
    return 0;
}

/*

只需要在主函数中写   int x;    x=Scan();即可。

当有大量输入输出数据的时候,输入外挂还是可以节约一定时间的。

*/

//输入外挂
int Scan()
{
    int res = 0 , ch;
    while( !( ( ch = getchar() ) >= '0' && ch <= '9' ) )
    {
        if( ch == EOF )  return 1 << 30 ;
    }
    res = ch - '0' ;
    while( ( ch = getchar() ) >= '0' && ch <= '9' )
        res = res * 10 + ( ch - '0' ) ;
    return res ;
}
//输入外挂
int Scan()     //输入外挂
{
    int res=0,ch,flag=0;
    if((ch=getchar())=='-')
        flag=1;
    else if(ch>='0'&&ch<='9')
        res=ch-'0';
    while((ch=getchar())>='0'&&ch<='9')
        res=res*10+ch-'0';
    return flag?-res:res;
}
//输出外挂
void Out(int a)    //输出外挂
{
    if(a>9)
        Out(a/10);
    putchar(a%10+'0');
}


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值