1020
来源:互联网 发布:淘宝微淘广播有什么用 编辑:程序博客网 时间:2024/05/04 15:00
题目链接:
点击打开链接
水题。。。
代码:
#include <iostream>#include <cstdio>#include <cmath>#include <algorithm>#include <cstring>#include <string>#define ll long longusing namespace std;int main(){int test;scanf("%d", &test);int n;char name[10];for (int cas = 1; cas <= test; cas++){scanf("%d%s", &n, name);printf("Case %d: ", cas);if (strcmp(name,"Alice") == 0){if (n == 1)puts("Bob");else{n--;if (n % 3)puts("Alice");elseputs("Bob");}}else{if (n == 1)puts("Bob");else{if (n % 3)puts("Bob");elseputs("Alice");}}}return 0;}
阅读全文
0 0
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- 1020
- ZOJ3987(二进制枚举+java大数)
- Visual Studio 2017 调试若干问题
- 第一篇
- 转载——探寻C++最快的读取文件的方案std::ios::sync_with_stdio(false)——转载
- 集合的运算
- 1020
- 赶路人。
- 如何在laravel5.5中连接并使用多个数据库
- iOS开发—对NSOperation操作设置依赖关系
- [深度学习与计算机视觉] 斯坦福 CS231n 2017 学习笔记 -1 (Lecture 1: Introduction;课程介绍)
- JAVA-Exception
- js正则表达式
- u-boot 2013.04-rc1移植(3)
- 使用Echarts3.0做图表