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 ...
随机推荐
- vs 常用工具
工欲善其事,必先利其器,没有好的工具,怎么能高效的开发出高质量的代码呢?本文为 ASP.NET 开发者介绍一些高效实用的工具,包括 SQL 管理,VS插件,内存管理,诊断工具等,涉及开发过程的各个环节 ...
- 一句话搞定IOS中View的Frame和Bound
就一句话,Frame是父View上看到子View的窗户,Bound是子View上可以被父View看见的内容. 稍微解释下.Frame 指子View在父View中的位置以及大小.由两部分构成,第一部分是 ...
- Django升级到1.10,MEDIA_ROOT发生TypeError错误
Getting error: “TypeError: view must be a callable or a list/tuple in the case of include().” when r ...
- 模式识别之贝叶斯---朴素贝叶斯(naive bayes)算法及实现
处女文献给我最喜欢的算法了 ⊙▽⊙ ---------------------------------------------------我是机智的分割线----------------------- ...
- 蓝桥杯 第四届C/C++预赛真题(2) 马虎的算式(穷举)
标题: 马虎的算式 小明是个急性子,上小学的时候经常把老师写在黑板上的题目抄错了. 有一次,老师出的题目是:36 x 495 = ? 他却给抄成了:396 x 45 = ? 但结果却很戏剧性,他的答案 ...
- php数据库操作命令精华大全
1.表结构//列信息2.表数据//行信息3.表索引//把列中的行加到索引中(一般情况下一个表一定要把id这一列的所有数据都加到主键索引中) 2.[dos下]关闭mysql:net stop mysql ...
- python bottle学习(三)动态路由配置(通配符)
from bottle import (run, route, get, post, default_app, Bottle) @route('/', method='GET') @route('/i ...
- 【BZOJ4513】[Sdoi2016]储能表 数位DP
[BZOJ4513][Sdoi2016]储能表 Description 有一个 n 行 m 列的表格,行从 0 到 n−1 编号,列从 0 到 m−1 编号.每个格子都储存着能量.最初,第 i 行第 ...
- 【BZOJ4709】[Jsoi2011]柠檬 斜率优化+单调栈
[BZOJ4709][Jsoi2011]柠檬 Description Flute 很喜欢柠檬.它准备了一串用树枝串起来的贝壳,打算用一种魔法把贝壳变成柠檬.贝壳一共有 N (1 ≤ N ≤ 100,0 ...
- 【Charles】使用教程+破解+Windows版本https乱码+https证书安装注意
一.使用教程参考: 这一篇就够了,其他都是大同小异.Windows版和MAC版使用没太多区别. Charles 从入门到精通 | 唐巧的博客 https://blog.devtang.com/2015 ...