ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1336. Problem of Ben Betsalel

It's very easy problem
Posted by ZamNick 23 Jan 2012 18:46
It's very easy problem, but many people don't understand how to solve it ... :)

7 lines :

#include <iostream>
using namespace std;
int main(){
unsigned long long N;
cin >> N;
cout << N*N << endl << N;
return 0; }
Re: It's very easy problem
Posted by Kuros 13 Feb 2014 01:13
5 lines:
#include <iostream>
void main() {
    unsigned long long N;
    std::cin >> N;
    std::cout << N*N << std::endl << N; }
Re: It's very easy problem
Posted by mccolt89 28 Jul 2014 15:17
4 lines:
public class solver {
     public static void main(String[] args) {
      long n = new java.util.Scanner(System.in).nextInt();
      System.out.println(n*n + "\n"+n);}}
Re: It's very easy problem
Posted by TwoEightNine [SSAU4Life] 6 Oct 2014 22:49
var n:int64; begin read(n); writeln(n*n); write(n) end.

Edited by author 06.10.2014 22:49
Re: It's very easy problem
Posted by Evgeny Sibil 27 Nov 2015 01:59
OMG, i made prime factorization of n, searching for odd powers, multiplying to get k
got AC, but now I see it was not neccassary
Also for 18 i got 12 and 2, as in example.

Edited by author 27.11.2015 02:00
Re: It's very easy problem
Posted by mouse_wireless2 28 Mar 2018 04:43
1 line, no ";" tricks to put multiple lines into one :)

print (lambda x : str(int(x) * int(x)) + '\n' + x)(raw_input())