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. Qt的皮肤设计(Style Sheet)

      Qt的皮肤设计,也可以说是对Qt应用程序的界面美化,Qt使用了一种类CSS的样式规则QSS. 一.Style Sheet的应用 1.直接在程序代码中设置样式,利用setStyleSheet()方法 ...

  2. 关于ajaxfileupload.js一些问题和上传图片就立即显示图片功能

    ajaxfileupload.js是上传文件的一个插件,最近碰到的一个问题是在谷歌浏览器上传文件之后,原文本框中的文件名称消失,网上搜了好长时间也没有十分满意的答案.无刷新上传文件我想到的只有ajax ...

  3. CSS3 变形小结

    为原始大小 b:纵向扭曲,0为不变 c :横向扭曲,0不变 d:垂直伸缩量,1为原始大小 e:水平偏移量,0为初始位置 f  :垂直偏移向,0是初始位置 Ø原点 transform-origin() ...

  4. (转)Linux内核之进程和系统调用

    Linux内核之进程和系统调用 什么是系统调用 在Linux的世界里,我们经常会遇到系统调用这一术语,所谓系统调用,就是内核提供的.功能十分强大的一系列的函数.这些系统调用是在内核中实现的,再通过一定 ...

  5. jquery 银行卡号验证

    具体参考:https://github.com/jondavidjohn/payform 插件js: jquery.payform.js 具体操作 alert($.payform.validateCa ...

  6. Android学习笔记(广播机制)

    1.Android的广播机制介绍 收听收音机也是一种广播,在收音机中有很多个广播电台,每个广播电台播放的内容都不相同.接受广播时广播(发送方)并不在意我们(接收方)接收到广播时如何处理.好比我们收听交 ...

  7. 对 Xcode 菜单选项的详细探索(转)

    转自 http://www.cnblogs.com/dsxniubility/p/4983614.html 本文调研Xcode的版本是 7.1,基本是探索了菜单的每一个按钮.虽然从xcode4一直用到 ...

  8. [转]PHP取整函数:ceil,floor,round,intval的区别详细解析

    我们经常用到的PHP取整函数,主要是:ceil,floor,round,intval. 1.ceil -- 进一法取整 说明float ceil ( float value ) 返回不小于 value ...

  9. Syntax error on token "package", assert expected------踩坑记录

    今天写程序碰到个坑,eclipse编辑,jdk1.7,clean编译项目后报错Syntax error on token "package", assert expected 反复 ...

  10. 【POJ3237】【树链剖分】Tree

    Description You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edg ...