ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1336. Проблема Бен Бецалеля

It's very easy problem
Послано ZamNick 23 янв 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
Послано Kuros 13 фев 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
Послано mccolt89 28 июл 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
Послано TwoEightNine [SSAU4Life] 6 окт 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
Послано Evgeny Sibil 27 ноя 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
Послано mouse_wireless2 28 мар 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())