Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7190 - Тоо сэргээх

Сурагч 3 оронтой бичихдээ 1 тэмдэгт /цифр биш/ илүү биччихжээ. Илүү бичсэн тэмдэгтийг хасч уг оронтой тооны квадратыг ол.

Input

Нэг мөрөнд 4 тэмдэгт зайгүйгээр залгагдан өгөгдөнө. 3 нь цифр, 1 нь цифр биш.

Output

3 оронтой тооны квадрат.

Example

Input:
12r3

Output:
15129

Нэмсэн:Bataa
Огноо:2013-02-06
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2024-02-03 05:18:06
#include <bits/stdc++.h>
using namespace std;
int main() {
char input[4];
cin >> input;

int digit1 = input[0] - '0';
int digit2 = input[1] - '0';
int digit3 = input[3] - '0';

int number = digit1 * 100 + digit2 * 10 + digit3;

int square = number * number;
cout << square << endl;
return 0;
}
2023-01-13 19:12:05
#include <stdio.h>

int main(){
int x=0;
char a;
for(int i=0; i<4; i++){
scanf("%c",&a);
if(a - '0' < 10){
x = x*10 + a-'0';
}
}
printf("%d",x*x);
}
za ymrch bsn bodloo2 haha

Last edit: 2023-01-13 19:12:18
2022-09-25 02:45:13
Scanner scan = new Scanner (System.in);
System.out.print("");
String nu1 = scan.next();
nu1=nu1.replaceAll("[A-Za-z]", "");
int nu2=Integer.parseInt(nu1);
int a=nu2*nu2;

System.out.print(a);
2022-07-02 10:23:03
int main() {
int s = 0;
for (int i = 0; i < 4; i++){
char temp; cin >> temp;
if (temp - 48 >= 0 && temp - 48 <= 10){
if (s == 0) s = temp - 48;
else{
s *= 10;
s += temp - 48;
}
}
}
cout << s << endl;
cout << s * s;
return 0;
}
2022-05-30 08:14:01
Bodolt bodoh zaavar
1. https://youtu.be/iik25wqIuFo
2022-05-30 08:10:31
sha2

2022-03-31 06:08:00
zail


Last edit: 2022-03-31 06:09:19
2022-03-31 06:05:25
azaa sugad zoriulav
2022-03-31 06:04:30
Э. Содномдорж
#include<bits/stdc++.h>
int main(){
int n,s;
scanf("%d",&n);
n<=50;
s=(n+1)*(n+2)*(n+3)*(n+4)*(n+5)/120;
printf("%d",s);
}
2022-02-07 16:50:33
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);

String str;

str = input.next();

char [] x= new char [str.length()];
int [] c = new int[str.length()];
int [] z = new int[str.length()];
int n=0, a=0, b=1, d=0, a1=0;

for (int i=0; i<str.length(); i++) {
x[i] = str.charAt(i);
}

for (int i=0; i<str.length(); i++) {
c[i] = x[i]-48;
if (c[i] < 10) {
z[d] = c[i];
a++;
a1++;
d++;
}
}

while (a > 1) {
b = b*10;
a--;
}

for (int i=0; i<a1; i++) {
z[i] = z[i]*b;
n = n+z[i];
b = b/10;
}

System.out.print(n*n);

input.close();
}
}

// Fb: V Bat Ireedui ^_^
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.