# 3.13日蓝桥算法打卡

``````import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
//在此输入您的代码...
System.out.println(20*22+4-1);
scan.close();
}
}
``````

``````import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
long a=s.nextLong();
long b=s.nextLong();
long n=s.nextLong();
long count=5*a+b*2;//一周的题数
long time=1;//最后一周第几天
int num=0;
long zhou=n/count;//多少周
long next=n%count;//最后一周剩多少题
while(num<next)
{if(time%7==0||time%6==6)
num+=b;
else num+=a;
time++;
}
System.out.println(zhou*7+time-1);
}
}
``````

ond_category_id=3&tags=2022)

``````import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for ( int i = 1 ; i <= n ; i++ ){
int max = Math.max(n-i,i-1);
System.out.println(max*2);

}
}
}
``````

...全文
4 回复 打赏 收藏 举报

4.3w+

2023-03-13 22:03

刷题！