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这种啊

代码很简单,不解释

  1. #include<stdio.h>
  2. int main()
  3. {
  4. int a,b,n;
  5. while(~scanf("%d",&n))
  6. {
  7. if(n>)
  8. printf("0\n");
  9. else
  10. {
  11. b=(-n/)*;
  12. if(n%==)
  13. b+=;
  14. printf("%d\n",b);
  15. }
  16. }
  17. return ;
  18. }

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. delphi tidhttp 超时的解决方案

    现在delphi都发布到xe10.1了,tidhttp还有缺陷,那就是超时设置在没有网络或者连不上服务器的时候是无效的,不管你设置为多少都要10-20秒.connectTimeout和readTime ...

  2. leetcode题解||Reverse Integer 问题

    problem: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 ...

  3. 程序猿接私活经验总结,来自csdn论坛语录

    下面为网上摘录,以做笔记: 但是到网上看看,似乎接私活也有非常多不easy,技术问题本身是个因素,还有非常多有技术的人接私活时被骗,或者是合作到最后以失败告终,所以想请有经验的大侠们出来指点一下,接私 ...

  4. iOS开发中关于UIImage的知识点总结

    UIImage是iOS中层级比较高的一个用来加载和绘制图像的一个类,更底层的类还有 CGImage,以及iOS5.0以后新增加的CIImage.今天我们主要聊一聊UIImage的三个属性: image ...

  5. [转] Node.js 服务端实践之 GraphQL 初探

    https://medium.com/the-graphqlhub/your-first-graphql-server-3c766ab4f0a2#.n88wyan4e 0.问题来了 DT 时代,各种业 ...

  6. [转] npm命令概述

    PS:问题,nvm找不到正确的下载server NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist nvm ls-remote NVM_NODEJS_ORG_MI ...

  7. Vector/Arraylist与Linklist的区别

        SDK提供了有序集合接口java.util.List的几种实现,其中三种最为人们熟知的是Vector.ArrayList和    LinkedList.有关这些List类的性能差别是一个经常被 ...

  8. Android(java)学习笔记199:Android中补间动画(Tween Animation)

    本文主要简单介绍补间动画使用代码实现, 关于使用xml实现补间动画,可以参看:自定义控件三部曲之动画篇(一)——alpha.scale.translate.rotate.set的xml属性及用法 1. ...

  9. 我是一块cpu 《转载》

    我是一块cpu,原装intel,在一台普通的台式计算机里供职.我有个小弟是内存,我要靠他时时刻刻陪伴我工作,其实有时候我并不是没有某某地址的资料,而是懒得翻--麻烦. 还有一个老大哥叫bios,每次那 ...

  10. Html网页生成Pdf

    在http://code.google.com/p/wkhtmltopdf/downloads/list下载安装程序. 1.添加引用 using System.Diagnostics; 添加引用 2. ...