• <input id="auww4"></input>
  • <input id="auww4"><acronym id="auww4"></acronym></input>
  • <input id="auww4"><u id="auww4"></u></input>
    <object id="auww4"><acronym id="auww4"></acronym></object>
    <menu id="auww4"></menu><input id="auww4"><u id="auww4"></u></input>
    <input id="auww4"><u id="auww4"></u></input>
  • F.A.Q
    Hand In Hand
    Online Acmers
    Forum | Discuss
    Statistical Charts
    Problem Archive
    Realtime Judge Status
    Authors Ranklist
     
         C/C++/Java Exams     
    ACM Steps
    Go to Job
    Contest LiveCast
    ICPC@China
    Best Coder beta
    VIP | STD Contests
    Virtual Contests
        DIY | Web-DIY beta
    Recent Contests
    Author ID 
    Password 
     Register new ID

    Re:10行C代碼,超簡單

    Posted by hitwh2200400216 at 2020-12-15 16:09:17 on Problem 2015
    (392)  


    #include<cstdio>
    int main(){
    	int n,m;
    	while(scanf("%d%d",&n,&m)!=EOF){
    		int i=1;
    		for(i;(i+m)<=n;i+=m)
    			printf("%d ",2*i+m-1);
    		printf("%d\n",2*i+n-i);
    	}
    }
    ----------------------------------------------------------------------------------

    Followed by:


    Post your reply here:

    Author ID
    Password
    Title
    Content  
     
    Hangzhou Dianzi University Online Judge 3.0
    Copyright © 2005-2021 HDU ACM Team. All Rights Reserved.
    Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
    Total 0.000000(s) query 5, Server time : 2021-01-20 21:20:52, Gzip enabled
    棋牌