hdu acm1564

学习 时间:2026-04-07 22:31:25 阅读:6496
hdu acm1564Problem DescriptionNew Year is Coming!ailyanlu is very happy today!and he is playing a chessboard game with 8600.The size of the chessboard is n*n.A stone is placed in a corner square.They play alternatively with 8600 having the first move.Each time,player is allowed to move the stone to an unvisited neighbor square horizontally or vertically.The one who can't make a move will lose the game.If both play perfectly,who will win the game?InputThe input is a sequence of positive integers each in a separate line.The integers are between 1 and 10000,inclusive,(means 1

最佳回答

美丽的面包

痴情的万宝路

2026-04-07 22:31:25

画图便可得到规律: 偶数时:8600胜 奇数时:ailyanlu胜代码:#includeint main(){ int n; while(scanf("%d",&n),n) { if(0==n%2) puts("8600"); else puts("ailyanlu"); } return 0;}

最新回答共有2条回答

  • 柔弱的路灯
    回复
    2026-04-07 22:31:25

    画图便可得到规律: 偶数时:8600胜 奇数时:ailyanlu胜代码:#includeint main(){ int n; while(scanf("%d",&n),n) { if(0==n%2) puts("8600"); else puts("ailyanlu"); } return 0;}

上一篇 写组排比句,表达出自己的喜.怒.哀.乐

下一篇 甲乙两人参加乒乓球比赛,规定先胜3局者胜,问比赛情况有多少种?