Time Limit: 3000MS Memory limit: 65536K
题目描述
In St Petersburg phone numbers are formatted as “XXX–XX–XX”, where the first three digits represent index of the Automated Telephone Exchange (ATE). Each ATE has exactly 10000 unique phone numbers.Peter has just bought a new flat and now he wants to install a telephone line. He thinks that a phone number is lucky if the arithmetic expression represented by that phone number is equal to zero. For
example, the phone number 102–40–62 is lucky (102-40-62 = 0), and the number 157–10–47 is not lucky (157-10-47 = 100 != 0).
Peter knows the index of the ATE that serves his house. To get an idea of his chances to get a lucky number he wants to know how many lucky numbers his ATE has.
输入
 The input file contains a single integer number n — the index of Peter’s ATE (100 <= n <= 999).
输出
 Output a single integer number — the number of lucky phone numbers Peter’s ATE has.
示例输入
196
239示例输出
3
0

题目意思:一个人有个喜好,对于XXX-XX-XX这种电话号码,他喜欢让他的的值为0,也就是  XXX-XX-XX=0;

给出XXX,求出有多少种情况满足他喜欢的号码

注意:xx可能是01。02这种啊

代码很简单,不解释

 #include<stdio.h>
int main()
{
int a,b,n;
while(~scanf("%d",&n))
{
if(n>)
printf("0\n");
else
{
b=(-n/)*;
if(n%==)
b+=;
printf("%d\n",b);
}
}
return ;
}

Automated Telephone Exchange的更多相关文章

  1. 【poj4011】Automated Telephone Exchange

    题目:Automated Telephone Exchange poj URL:http://poj.org/problem?id=4011 原题如下图: 题意: 就是一个三位数减去两个小于或等于99 ...

  2. exchange From Middle English eschaunge

    exchange From Middle English eschaunge, borrowed from Anglo-Norman eschaunge exchange 1.An act of ex ...

  3. poj1144 求不同割点的个数

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11914   Accepted: 5519 Descript ...

  4. poj 1144 Network 图的割顶判断模板

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 8797   Accepted: 4116 Descripti ...

  5. poj1144

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12521   Accepted: 5760 Descript ...

  6. POJ 1144 Network(Tarjan求割点)

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12707   Accepted: 5835 Descript ...

  7. UVA 315 315 - Network(求割点个数)

     Network  A Telephone Line Company (TLC) is establishing a new telephone cable network. They are con ...

  8. uva 315 Network(无向图求割点)

    https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  9. poj 1144 Network【双连通分量求割点总数】

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11042   Accepted: 5100 Descript ...

随机推荐

  1. [RxJS] Transformation operators: delay and delayWhen

    This lessons teaches about delay and delayWhen: simple operators that time shift. delay(number | dat ...

  2. Cocos2d-x游戏开发中的消息机制:CCNotificationCenter的使用

    在HTML5游戏开发中,js可以使用Event对象的addEventListener(添加事件监听).dispatchEvent(触发事件)实现监听机制,如果在coocos2d-x中,去实现这种机制该 ...

  3. ios中图片的绘画和截图

    ios中图片的绘画和截图 CGImageCreateWithImageInRect截图和UIGraphicsGetImageFromCurrentImageContext绘画图片 使用CGImageC ...

  4. jQuery Capty 图片标题插件

    jQuery Capty是可以为图片添加漂亮的字幕的插件 文件包含: <link type="text/css" rel="stylesheet" hre ...

  5. 原生JS+tween.js模仿微博发布效果

    转载请注明出处:http://www.cnblogs.com/zhangmingze/p/4816865.html 1.先看效果吧,有效果才有动力: 2.html结构: <!DOCTYPE ht ...

  6. List(列表)

    List(列表): List的特征是其元素以线性方式存储,集合中可以存放重复对象. List接口主要实现类包括: ArrayList() : 代表长度可以改变得数组.可以对元素进行随机的访问,向Arr ...

  7. C#中关于webconfig的读写

    近期一个小网站需要一个计数的信息 偷懒不想用别的什么方法 原本想用个xml 无奈不太会使 虽然不推荐这种方法 不过还是记下来方便日后查看 webconfig信息 <?xml version=&q ...

  8. SQL数据库安装

    安装过程中经常出现失败或者提示,那么久要清楚干净所有的数据在重新安装,步骤如下. SQL2008卸载 一.从控制面板卸载 1)点击计算机右下角“开始”,点击“控制面板” 2)点击“卸载程序”. 卸载与 ...

  9. CI 笔记5 (CI3.0 默认控制器,多目录)

    在ci3.x中,不支持多级子目录的默认控制器设置, 解决方法如下: 在index.php中,添加  $routing['directory'] = 'admin';然后在默认的router.php的默 ...

  10. iOS 中如何监测某段代码运行的时间

    在iOS里面有时间涉及到网络请求,有时间涉及到数据库的查询,我们需要计算该段代码的效率, 以及执行时间方面的问题,为此,可以使用下面方法: double a = CFAbsoluteTimeGetCu ...