hdu acm1564

学习 时间:2026-06-04 23:06:15 阅读:9086
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-06-04 23:06:15

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

最新回答共有2条回答

  • 无奈的世界
    回复
    2026-06-04 23:06:15

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

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

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