PAT 天梯赛 L1-041. 寻找250 【水】
题目链接
https://www.patest.cn/contests/gplt/L1-041
AC代码
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <cstdlib>
#include <ctype.h>
#include <numeric>
#include <sstream>
using namespace std;
typedef long long LL;
const double PI = 3.14159265358979323846264338327;
const double E = 2.718281828459;
const double eps = 1e-6;
const int MAXN = 0x3f3f3f3f;
const int MINN = 0xc0c0c0c0;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;
int main()
{
int n;
int flag = 0;
int vis = 1;
while (~scanf("%d", &n))
{
if (n == 250)
flag = 1;
else if (flag == 0)
vis ++;
}
cout << vis << endl;
}
PAT 天梯赛 L1-041. 寻找250 【水】的更多相关文章
- PAT 天梯赛 L1-047. 装睡 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-047 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-042. 日期格式化 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-042 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-022. 奇偶分家 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-022 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-016. 查验身份证 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-016 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-014. 简单题 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-014 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-012. 计算指数 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-012 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-010. 比较大小 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-010 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-007. 念数字 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-007 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-004. 计算摄氏温度 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-004 AC代码 #include <iostream> #include <cstdio&g ...
- PAT 天梯赛 L1-028. 判断素数 【水】
题目链接 https://www.patest.cn/contests/gplt/L1-028 AC代码 #include <iostream> #include <cstdio&g ...
随机推荐
- Firefox模拟手机访问手机网站
说明: 此方法只能用以那些以识别UA来判断的网站 使用步骤: 第一步:打开Firefox,点击菜单,工具-〉附加组件-〉获取附加组件: 第二步:查询安装三个组件:User Agent Switcher ...
- Linux下面 多线程死锁问题的调试
最近写服务,经常是单进程,多线程的,加了各种锁,很担心出现死锁问题,专门学习了一下死锁问题的诊断. 死锁 (deallocks): 是指两个或两个以上的进程(线程)在执行过程中,因争夺资源而造成的一种 ...
- Pat(Advanced Level)Practice--1026(Table Tennis)
Pat1026代码 题目描写叙述: A table tennis club has N tables available to the public. The tables are numbered ...
- js ie 6,7,8 使用不了 firstElementChild
一. <div> <p>123</p> </div> 在上面这段代码中,如果使用以下js代码 var oDiv=document.getElementB ...
- 蓝桥杯 第四届C/C++预赛真题(2) 马虎的算式(穷举)
标题: 马虎的算式 小明是个急性子,上小学的时候经常把老师写在黑板上的题目抄错了. 有一次,老师出的题目是:36 x 495 = ? 他却给抄成了:396 x 45 = ? 但结果却很戏剧性,他的答案 ...
- 将几何画板x轴坐标值换成弧度制的方法
大家在学习数学的过程中,都会遇到函数,这个时候大家都会遇到函数图像.对于函数图像我们一般都会通过先建立坐标系,然后让图像呈现在坐标系中.函数的种类有很多,三角函数就是其中之一,在绘制三角函数图像时,我 ...
- 阿里面试经历JAVA总结
为记录阿里的电面经历,特与大家分享,岗位是JAVA研发工程师. 一面主要问题如下: 1)首先自我介绍 2)数据结构算法的基本问题,如排序算法,二叉树遍历,后序遍历非递归,图的最短路径问题 3)对一个数 ...
- win7下安装memcached
memcached server端服务在win7下的安装.启动图解 1.首先下载解压memcached-1.2.6-win32-bin.zip到某一盘下,如下图 2.通过管理员方式运行cmd.exe. ...
- cxGrid 显示行号及行号列列名
cxGrid默认不显示行号,但是可以通过cxGrid1DBTableView1CustomDrawIndicatorCell事件来重绘行号 选中cxGrid1DBTableView1,在OnCusto ...
- ios 时间解析 差8个小时
啥问题也有:小程序中web开发工具里显示时间正常,ios上显示的查8小时 原因: 使用 NSDate *date = [NSDate date]; 获取的时间是标注的UTC时间,和北京时间相差8小时. ...