|
|
back to boardIt'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 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 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 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 1 line, no ";" tricks to put multiple lines into one :) print (lambda x : str(int(x) * int(x)) + '\n' + x)(raw_input()) |
|
|