K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

20 tháng 8 2023

 

Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different. In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygon, the size and the number of angles could vary from one circus to another. In each corner of the arena there was a special pillar, and the rope strung between the pillars marked the arena edges. Recently the scientists from Berland have discovered the remains of the ancient circus arena. They found...
Đọc tiếp

Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different. In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygon, the size and the number of angles could vary from one circus to another. In each corner of the arena there was a special pillar, and the rope strung between the pillars marked the arena edges. Recently the scientists from Berland have discovered the remains of the ancient circus arena. They found only three pillars, the others were destroyed by the time. You are given the coordinates of these three pillars. Find out what is the smallest area that the arena could have.

Input

The input file consists of three lines, each of them contains a pair of numbers  coordinates of the pillar. Any coordinate doesn't exceed 1000 by absolute value, and is given with at most six digits after decimal point.

Output

Output the smallest possible area of the ancient arena. This number should be accurate to at least 6 digits after the decimal point. It's guaranteed that the number of angles in the optimal polygon is not larger than 100.

Input :

0.000000 0.000000 1.000000 1.000000 0.000000 1.000000

Output :

1.00000000

0
19 tháng 8 2023

Là con trăn

19 tháng 8 2023

là 1ngôn ngữ lập trình cơ bản . Ngoài ra còn có ngôn ngư x lập trình(code) như java.....

19 tháng 8 2023

- Bạn vào shop.olm.vn

- Đăng nhập tài khoản của bạn vào rồi thực hiện để đổi quà chứ không thể chuyển sang tiền mặt

BÀI 2. ĐỘ CAO CỦA DÃY SỐ DOCAO13.PASTa gọi độ cao của một số nguyên dương K là tổng giá trị các chữ số của K.Ví dụ: số 25362 có độ cao là 18. Cho dãy số nguyên dương A gồm N phần tử a 1 ,a 2 , ..., a N .(1 ≤ N ≤ 1000, 1 ≤ i ≤ N, 0 < a i ≤ 2147483647)Yêu cầu: Hãy tính độ cao của các phần tử trong dãy số A.Dữ liệu vào: Ghi trong file văn bản DOCAO13.INP có cấu trúc như sau:- Dòng 1: Ghi số nguyên dương N, là số...
Đọc tiếp

BÀI 2. ĐỘ CAO CỦA DÃY SỐ DOCAO13.PAS
Ta gọi độ cao của một số nguyên dương K là tổng giá trị các chữ số của K.
Ví dụ: số 25362 có độ cao là 18. Cho dãy số nguyên dương A gồm N phần tử a 1 ,
a 2 , ..., a N .(1 ≤ N ≤ 1000, 1 ≤ i ≤ N, 0 < a i ≤ 2147483647)
Yêu cầu: Hãy tính độ cao của các phần tử trong dãy số A.
Dữ liệu vào: Ghi trong file văn bản DOCAO13.INP có cấu trúc như sau:
- Dòng 1: Ghi số nguyên dương N, là số lượng phần tử của dãy số.
- Dòng 2: Ghi N số nguyên dương, số thứ i là giá trị của phần tử a i trong dãy số,
các số được ghi cách nhau ít nhất một dấu cách.
Dữ liệu ra: Ghi ra file văn bản DOCAO13.OUT theo cấu trúc như sau:
- Dòng 1: Ghi N số nguyên dương t 1 , t 2 , ..., t N, t i là độ cao của số của a i . Các số
được ghi cách nhau một dấu cách.
Ví dụ:

DOCAO13.INP DOCAO13.OUT
5 13 5 5 10 9

1

const fi='docao13.inp';

fo='docao13.out';

var f1,f2:text;

a:array[1..100]of integer;

i,n:integer;

//chuongtrinhcon

function kq(x:integer):integer;

var t,k:integer;

begin

t:=0;

while (x>0) do

begin

k:=x mod 10;

t:=t+k;

x:=x div 10;

end;

kq:=t;

end;

//chuongtrinhchinh

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

readln(f1,n);

for i:=1 to n do 

read(f1,a[i]);

for i:=1 to n do

write(f2,kq(a[i]):4);

close(f1);

close(f2);

end.

19 tháng 8 2023

#include <iostream>

#include <cmath>

using namespace std;

bool isPrime(int number) {

     if (number < 2) {

          return false;

     }

     for (int i = 2; i <= sqrt(number); i++) {

          if (number % i == 0) {

               return false;

          }

     }

     return true;

}

int main() {

     int N;

     cin >> N;

     int count = 0;

     for (int i = 0; i < N; i++) {

          int num;

          cin >> num;

          if (isPrime(num)) {

               count++;

          }

     }

     cout << "Số lượng số nguyên tố trong dãy là: " << count << endl;

     return 0;

}

16 tháng 8 2023

chú ý làm c++ nhé !

 

#include <bits/stdc++.h>

using namespace std;

int A[100],B[100],C[100],kt,n,nn,dem1=0, dem2=0;

int main()

{

cin>>n;

for (int i=1; i<=n; i++)

cin>>A[i];

kt=0;   

nn=INT_MAX;   

for (int i=1; i<=n; i++)     

if (A[i]%2!=0)     

{     

kt=1;     

if (nn>=A[i]) nn=A[i];   

  } 

  if (kt==0) cout<<"khong co";   

else cout<<nn;   

cout<<endl;   

for (int i=1; i<=n; i++)     

if (A[i]%2==0 && A[i]>7)     

cout<<A[i]<<" ";   

cout<<endl;   

for (int i=1; i<=n; i++)     

if (A[i]%2!=0)     

{     

dem1++;     

B[dem1]=A[i];     

}   

for (int i=1; i<=n; i++)   

if (A[i]%2==0)   

{   

dem2++;   

C[dem2]=A[i];   

}   

sort(B,B+dem1+1);   

sort(C,C+dem2+1);   

for (int i=dem1; i>=1; i--)     

cout<<B[i]<<" ";   

for (int i=1; i<=dem2; i++)     

cout<<C[i]<<" ";

}