ACM输入输出介绍.pptVIP

  • 6
  • 0
  • 约1.35万字
  • 约 86页
  • 2017-06-14 发布于北京
  • 举报
ACM程序设计 ACM题目特点 由于ACM竞赛题目的输入数据和输出数据一般有多组(不定),并且格式多种多样,所以,如何处理题目的输入输出是对大家的一项最基本的要求。这也是困扰初学者的一大问题。 下面,分类介绍: 一个超级简单的题目(ex-1): Problem Description Your task is to calculate a + b. Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.? Output For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input. Sample input 1 5 10 20 Sample output 6 30 初学者很常见的一种写法: #includestdio.h void main() { int a,b; scanf(“%d %d”,a,b); Printf(“%d”,a+b)

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档