Logo
(追記) (追記ここまで)

11298번 - Graphs 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB183777148.630%

문제

Miss Fotheringale is teaching her maths class about plotting graphs. As a first exercise, she wants them to plot a linear graph y = ax + b for values of x from 0 to 10 inclusive.

She wants you to help by writing a program that outputs the correct answers to make it easier for her to mark her pupils' work.

입력

The first line of input is a single number N, 0 < N < 30, a positive integer that tells the number of graphs to be plotted.

N lines then follow, each representing one graph to be plotted. Each line contains 2 non-negative integers, A and B, 0 <= A, B <10, being the values of a and b for the graph. A and B will not both be 0.

출력

For each graph, firstly output the equation being plotted on a line by itself. Under this must be the graph. All points on the axes, plus points on the graph must be represented by the * character. The x axis must contain the points 0 to 10 from left to right, the y axis the points 0 to the maximum value from bottom to top.

제한

예제 입력 1

2
1 0
2 2

예제 출력 1

y = 1x + 0
* *
* * 
* * 
* * 
* * 
* * 
* * 
* * 
* * 
** 
***********
y = 2x + 2
* *
* 
* * 
* 
* * 
* 
* * 
* 
* * 
* 
* * 
* 
* * 
* 
* * 
* 
* * 
* 
** 
* 
* 
* 
***********

힌트

출처

ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2015 G번

  • 잘못된 데이터를 찾은 사람: zych1751
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /