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.

22 tháng 11 2019
#include<bits/stdc++.h> using namespace std; int main(){ int n, m; cin>>n>>m; int A[n+1]={}, d[n+1]={}; for(int i=1; i<=n; i++){ cin>>A[i]; d[i]=A[i]+d[i-1]; } int vt=m, res=d[m]; for(int i=m+1; i<=n; i++){ if(d[i]-d[i-m]>res){ vt=i; res=d[i]-d[i-m]; } } for(int i=vt-m+1; i<=vt; i++){ cout<<A[i]<<' '; } }
24 tháng 11 2019

Mình học pascal bạn ơi, thế này khó hiểu quá

There are many activities that people do in their free time to relax their stressed mind. Among long list of varios activities, there is one I’m interested in, that is travelling – an informative and adventurous hobby which is also one of the most popular pastimes. For some it is a waste of time and money. They argue to use an alternative like read a book or watch a film related to places to be travelled. They forget that touch of actuality gives a different type of sensation and...
Đọc tiếp

There are many activities that people do in their free time to relax their stressed mind. Among long list of varios activities, there is one I’m interested in, that is travelling – an informative and adventurous hobby which is also one of the most popular pastimes. For some it is a waste of time and money. They argue to use an alternative like read a book or watch a film related to places to be travelled. They forget that touch of actuality gives a different type of sensation and satisfaction.Travelling is a perfect educational hobby as it helps you learn a lot of new things in life. Travelling gives you a great break from your routine and an opportunity to learn a new culture and make friends. The people you come across and interact with may give you some new chances in life, or they may open up your mind. Another interesting thing about travel is that you can travel by many different means such as trains, buses, airplanes, ....

0
12 tháng 11 2019

đề bạn ghi không đúng thì làm sao làm được

12 tháng 11 2019

bước 1: nhập n

bước 2: đổi n ra chuỗi bằng cách dùng hàm str(n,st);

bước 3: d:=length(st); t:=0;

bước 4: chạy for i từ 1 tới d

bước 5: đổi st[i] ra số bằng cách sử dụng hàm val(st[i],x,y);

bước 6: t:=t+x;

bước 7 nếu t chia hết cho d thì viết (n,' la so dep')

không thì viết (n,' khong la so dep');

bước 8:kết thúc

11 tháng 11 2019

câu 1:

bước 1: nhập n

bước 2: đổi n ra chuỗi st bằng cách sử dụng hàm str(n,st)

bước 3: d:=length(st);t:=0;

bước 4: chạy for i đi từ 1 tới d

bước 5: đổi st[i] ra số bằng cách sử dụng hàm val(st[i],x,y);

bước 6: t:=t+x;

bước 7: viết t ra màn hình

bước 8: kết thúc

câu 2:

bước 1: nhập n

bước 2: t:=0;

bước 3: quét for i đi từ 1 tới n

bước 4: nếu n chia hết cho i thì t:=t+i;

bước 5: viết t ra màn hình

bước 6: kết thúc

11 tháng 11 2019

Những hành vi của học sinh là vi phạm pháp luật trong xã hội tin học hoá là :

  • Tung những hình ảnh, phim đồi trị lên mạng
  • Xâm phạm thông tin cá nhân hoặc của tập thể nào đó. Sao chép bản quyền không hợp pháp
  • Lây lan virut qua mạng
11 tháng 11 2019

- Những hành vi của học sinh là vi phạm pháp luật trong xã hội tin học hoá là :

  • Tung những hình ảnh, phim đồi trị lên mạng
  • B. Xâm phạm thông tin cá nhân hoặc của tập thể nào đó. Sao chép bản quyền không hợp pháp
  • C. Lây lan virut qua mạng
11 tháng 11 2019

câu 1:

-bước 1: nhập n

-bước 2: t:=0; chạy for từ 1 tới n div 2

-bước 3: nếu n chia hết cho i thì t:=t+i;

-bước 4: nếu t=n thì viết(n,' la so hoan hao');

-bước 5: kết thúc

câu 2:

-bước 1: nhập n

-bước 2: đổi n ra st bằng cách dùng hàm str(n,st);

-bước 3: d:=length(st);

-bước 4: chạy for từ d xuống 1

-bước 5: viết st[i];

-bước 6: kết thúc