oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

squares Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

squares.html

Bob the Penguin wants to find out all the distinct areas of squares (with unique lengths of integer value) that will fit into his square container of length L. Will you help him?

Task

Write a program that takes in 1 integer value, L, and output square numbers from 1 up to L*L.

Constraints

0 ≤ L ≤ 1,000

Input

Your program should read from standard input the following data:
The first line contains 1 integer L.

Output

Your program should write to the standard output a single line of square numbers separated by a single space. There should not be a space character at the end of the line.

Sample Input 1

3

Sample Output 1

1 4 9

Tags

Syntax

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110051s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o squares -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.