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.|

ABR0001 - Арифметик үйлдлүүд(жишээ)

а, b хоёр бодит тоо өгөгдөв. Эдгээр тоонуудын нийлбэр, ялгавар, үржвэрийг ол.

Input

а ба b хоёр бодит тоог хооронд нь нэг хоосон зайгаар тусгаарлан өгнө

Output

Эхний мөрөнд уг хоёр тооны нийлбэр, дараагийн мөрөнд ялгавар (a-b), гурав дахь мөрөнд үржвэрийг таслалаас хойш нэг орны нарийвчлалтай байхаар хэвлэнэ.

Example

Input:
10.5 3.6

Output:
14.1
6.9
37.8

Паскал хэл дээрх бодолт:
 
      var
        a,b:real;
      begin
        read(a,b);
        writeln(a+b:0:1);
        writeln(a-b:0:1);
        writeln(a*b:0:1);
      end. 

С хэл дээрх бодолт:
   
      #include "stdio.h"
      int main()
      {
        float a,b;
        scanf("%f%f",&a,&b);
        printf("%.1f\n%.1f\n%.1f", a+b, a-b, a*b);
        return 0;
      } 

C++ хэл дээрх бодолт:

      #include "iostream"
      using namespace std;
      int main()
      {
        double a,b;
        cin >> a >> b;
        cout.setf(ios::fixed|ios::showpoint);
        cout.precision(1);
        cout << a+b << endl << a-b << endl << a*b;
        return 0;
      } 

Нэмсэн:sw40
Огноо:2007-10-14
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:Бүгд дараах хэлүүдээс бусад: ASM32-GCC MAWK BC C-CLANG NCSHARP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR ERL FANTOM FORTH GOSU GRV JS-RHINO JS-MONKEY JULIA KTLN NIM NODEJS OBJC OBJC-CLANG OCT PERL6 PICO PROLOG PYPY PYPY3 PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET
Эх сурвалж:Абрамов С. А.

hide comments
2024-01-09 06:03:29
⠀⠀⠀⣴⣾⣿⣿⣶⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢸⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠈⢿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠊⣉⣩⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣼⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⣼⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢀⣾⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢠⣾⣿⣿⠉⣿⣿⣿⣿⣿⡄⠀⢀⣠⣤⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠙⣿⣿⣧⣿⣿⣿⣿⣿⡇⢠⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣷⠸⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠘⠿⢿⣿⣿⣿⣿⡄⠙⠻⠿⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⡟⣩⣝⢿⠀⠀⣠⣶⣶⣦⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣷⡝⣿⣦⣠⣾⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣿⣿⣮⢻⣿⠟⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡇⠀⠀⠻⠿⠻⣿⣿⣿⣿⣦⡀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⠇⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⡆⠀⠀
⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⠇⠀⠀
⠀⠀⠀⠀⠀⠀⢸⣿⣿⡿⠀⠀⠀⢀⣴⣿⣿⣿⣿⣟⣋⣁⣀⣀⠀
⠀⠀⠀⠀⠀⠀⠹⣿⣿⠇⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇
2022-12-07 03:27:59
#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e;
cin>>a>>b;
c=(a*b)/2;
cout<<c<<endl;

}
2022-05-09 08:08:43
a,b =[float(x)for x in input().split()]
s="{:.1f}".format(a+b)
d="{:.1f}".format(a-b)
f="{:.1f}".format(a*b)
print(s,d,f)
MAI SUGUUDAA
2021-02-11 12:07:29
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
#include<ctime>
#define SIZE 11
void printBoard(char plane[SIZE][SIZE])
{
int i,j;
for(i=1;i<=10;i++)
{
for(j=1;j<=10;j++)
{
printf(" %c ",plane[i][j]);
}
printf("\n");
}
}
int main()
{
int i,j,n,m;
char ongots[SIZE][SIZE];
for(i=1;i<=10;i++)
{
for(j=1;j<=10;j++)
{
ongots[i][j]='*';
}
}
srand(time(0));
i = rand()%10;

ongots[i+1][i+4]='T';
ongots[i][i+3]='B';
ongots[i+1][i+3]='B';
ongots[i+2][i+3]='B';
ongots[i+1][i+2]='B';
ongots[i][i+1]='B';
ongots[i+1][i+1]='B';
ongots[i+2][i+1]='B';
while(1>0)
{

printf("x:");
scanf("%d",&n);
printf("y:");
scanf("%d",&m);
if(n<11 && m<11)
{

if(ongots[n][m]=='T')
{
ongots[n][m]='X';
printf("You win");
printBoard(ongots);

}
else if(ongots[n][m]=='B')
{
ongots[n][m]='S';
printBoard(ongots);

}
else
{
printBoard(ongots);
}
} else
{
printf("Invalid value");
}
}
return 0;
}minii togloom
2019-09-11 15:45:34
hamgiin boginohon code

#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b,c,d,e;
cin>>a>>b;
printf("%.1lf\n%.1lf\n%.1lf",a+b,a-b,a*b);
}
2017-01-30 08:14:10
#include<stdio.h>
main(){
float a,b,urjver,yalgavar,niilber;
printf("a toog oruul=");scanf("%f",&a);
printf("b toog oruul=");scanf("%f",&b);
niilber=a+b;
urjver=a*b;
yalgavar=a-b;
printf("\n%.2f\n%.2f\n%.2f",niilber,urjver,yalgavar);
return 0;
}
2013-12-12 01:17:01 uuganaa
#include <stdio.h>
#include <stdlib.h>
int main(){
int a, b;

scanf("%d%d", &a, &b);
printf( "niilber=%d\n, ylgavar=%d\n, urjver=%d", a+b, a-b, a*b );
system("pause");
return 0;
}
2013-11-30 03:38:14 baysaa
#include <iostream>
#include <conio.h>
using namespace std;
int main () {
double a,b,c,d,e;
cin >> a;
cin >> b;
c=a+b;
d=a-b;
e=a*b;
cout << c << endl;
cout << d << endl;
cout << e << endl;
getch () ;
}
2013-11-17 05:37:51 Gantsooj
import java.util.Scanner;

public class Main{
public static void main(String [] args)
{
Scanner s=new Scanner(System.in);
float a=s.nextFloat();
float b=s.nextFloat();
float x=a+b;
float y=a*b;
float z=a-b;
s.close();
System.out.printf("%.1f",x);
System.out.println("");
System.out.printf("%.1f",z);
System.out.println("");
System.out.printf("%.1f",y);
}
}
2013-09-23 15:44:19 enkhbaysgalan

#include "stdio.h"
#include "stdlib.h"
int main()
{
float a,b;
scanf("%f%f",&a,&b);
printf("%.1f\n%.1f\n%.1f", a+b, a-b, a*b);
system("pause");
return 0;
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.