4.
- #include
- using namespace std;
- #include
- int main(){
- int N,i,j,temp,t,sum,max;
- temp=0;sum=0;max=0;
- cin>>N;
- int arr[N][N];
- for(i=0;i
- for(j=0;j
- cin>>arr[i][j];
- }
- }
- for(j=0;j
- max=arr[0][j];
- for(i=0;i
-1;i++){ - if(arr[i][j]
1][j]){ - max=arr[i+1][j];
- }
- }
- sum=sum+max;
-
- }
- cout<
- return 0;
- }
5.
- #include
- using namespace std;
- #include
- #include
- int main(){
- int len,i,a=0,t=0,k,temp,j=0;
- string arr;char b[100];
- cin>>arr;
- len=arr.length();
- for(i=len-1;i>=0;i--){
- a=(arr[i]-48)*pow(9,t)+a;
- t++;
- }
- k=a;temp=a;
- while(temp!=0){
- k=k%19;
- if(k<10){
- b[j]=k+'0';
- }
- else{b[j]=k-10+'a';
- //cout<
- }
- temp=temp/19;
- k=temp;
- j++;
- }
- for(t=j-1;t>=0;t--){
- cout<
- }
-
- }
6.
- #include
- using namespace std;
- int main(){
- int y1,y2,y3,n1=2018,n2=12,n3=24;
- int sum,i,a=0;
- cin>>y1>>y2>>y3;
- if(y1%4==0&&y1%100!=0||y1%400==0){
- a=1;
- }
- if(y2>2){
- for(i=y1+1;i<=n1;i++){
- if(i%4==0&&i%100!=0||i%400==0){
- sum++;
- }
- }}
- else{
- sum=sum+a;
- }
- cout<
- }
-
-
相关阅读:
【电源专题】案例:电源芯片规格书大标题写5A那是能输出5A吗?
PAT 1026 Table Tennis
Docker 网络虚拟化基础之网络 namespace
并发与并行,同步和异步,Go lang1.18入门精炼教程,由白丁入鸿儒,Go lang并发编程之GoroutineEP13
【总】HEC-RAS学习记录
MySQL中的InnoDB引擎
k8s:Pod 基础概念
java基于SpringBoot+Vu的疫情防控外出返乡行程管理系统 element 前后端分离
C++征途 --- STL中的常用算法(下)
产品思维训练 | 为什么很多家喻户晓的品牌还要继续投广告?
-
原文地址:https://blog.csdn.net/weixin_46061083/article/details/128172723