B. Chilly Willy

YOLOv8模型压缩终极方案:LAMP剪枝实战,速度提升不掉点 一个庞大的模型虽然强大,但在实际部署,尤其是资源受限的边缘设备(如无人机、移动电话、嵌入式系统)上,却面临着严峻的挑战:高昂的内存占用、巨大的计算量以及随之而来的高延迟和高能耗。本教程从LAMP剪枝的深刻理论出发,详细解释了它如何通过最小化最坏情况下的L2失真,并借助巧妙的数学简化,最终推导出一种高效、无超参数、层自适应的剪枝策略。它如同为臃肿的模型进行一次精准的“瘦身手术”,通过移除网络中冗余或不重要的权重、神经元甚至整个结构,来显著降低模型的参数量和计算量(FLOPs),从而实现推理加速和资源节约。 阅读详情

B. Chilly Willy
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games that were connected with them.

Chilly Willy wants to find the minimum number of length n, such that it is simultaneously divisible by all numbers Willy already knows (2, 3, 5 and 7). Help him with that.

A number’s length is the number of digits in its decimal representation without leading zeros.

Input
A single input line contains a single integer n (1 ≤ n ≤ 100000).

Output
Print a single integer — the answer to the problem without leading zeroes, or “-1” (without the quotes), if the number that meet the problem condition does not exist.

Examples

input
1
output
-1
input
5
output
10080

2、3、5、7的最小公倍数为210
当1<=n<=2时输出-1
当n=3时输出210

当n>=4时:给定任意一个大于最小值的n位数,位数不变的情况下若不是最小值就依次递减210,我们会得到首位为1,因为为210的倍数,末尾为0,末二三位未知,其余位为零的数
首先n=4输出1050,当运算n=5时对1050*10,按上述方法递减210,得到10080依照此规律向下寻找n=6…
因为3的倍数是有规律的,各位数字加和为3的倍数,所以未知的两位有有限个,上面递推过程一旦有一个重复便开始循环。先通过暴力加和的方法找出n=4~10 的结果,结果如下:
n=4 1050
n=5 10080
n=6 100170
n=7 1000020
n=8 10000200
n=9 100000110
n=10 1000000050
所以末三位为050、080、170、020、200、110的循环

#include<iostream>
using namespace std;
int main()
{
	int n, n1;
	cin >> n;
	if (n <= 2) cout << -1;
	else if (n == 3) cout << 210;
	else {
		cout << 1;
		n1 = n - 4;
		for (int i = 0; i < n1; i++) cout << 0;
		if ((n - 3) % 6 == 1) cout << "050";
		else if ((n - 3) % 6 == 2) cout << "080";
		else if ((n - 3) % 6 == 3) cout << "170";
		else if ((n - 3) % 6 == 4) cout << "020";
		else if ((n - 3) % 6 == 5) cout << "200";
		else if ((n - 3) % 6 == 0) cout << "110";
	}
}
RAG的“诊断艺术”:从测试集结果倒追根源,精准优化检索、排序与生成 当RAG应用给出一个糟糕的答案时,开发者的第一反应可能是:“我的Prompt写得不够好?”这种基于“感觉”的猜测往往是低效的。通过构建一个包含黄金上下文信息的测试集,我们可以像一位经验丰富的医生一样,对RAG系统的各个“器官”进行独立的“健康检查”。一个用于RAG诊断的测试集,除了问题和答案,还需要包含中间环节的“黄金标准”。如果你的RAG流程包含Re-ranker,那么在评估完初期的召回后,需要单独评估Re-ranker的效果。RAG的优化是一个持续的过程,应该形成一个闭环。的文档块尽可能多地召回。 阅读详情

相关推荐

stm32使用TB6600驱动器控制42BYGH型步进电机

stm32使用TB6600驱动器控制42BYGH型步进电机

qq_35653974的博客 9587

codeforces 2184 B. Chilly Willy(规律)

output standard output Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so

Grit_ICPC的博客 1212

小龙虾 OpenClaw 安装全攻略:本地部署 AI 智能体一步到位

OpenClaw(昵称小龙虾)是一款 MIT 开源协议的本地优先 AI 智能体执行网关,支持多平台接入、本地部署,能实现自然语言驱动的设备自动化操作,区别于纯对话 AI,可直接操控系统执行实际任务,数据全程本地存储更安全。本文带来 2026 最新版 OpenClaw 安装教程,适配 Windows/macOS/Linux 全系统,新手也能一键搞定。

lujiawei00的专栏 1976

Chilly Willy

http://codeforces.com/problemset/problem/248/B 一道规律题,如果模拟的话,会严重超时~ 输入n,输出一个数是2,3,5,7的倍数,这个数的位数必须是n; #include using namespace std; int main() { int n; while(cin>>n) { if(n<3){ cout<<"-1"

youlingjisuan的专栏 591

quartus 13.1常见报错解决方法

在使用quartus中会遇到很多由于安装或设置不规范造成的错误。我就目前我遇到的一些错误以及我的解决方法分享给大家,这个文章将会持续更新,如果读者有遇到软件中错误无法解决的问题,也欢迎在评论区留言。 一、编译出现lience错误 在对设计的电路编译时,系统在程序运行3秒内即结束并报错,大概意思为现有的证书不支持编译。这个常见问题源自破解不成功,这里读者很有可能犯的错误是在使用破解器的时候没有区分x86(即32-bit)和x64软件破解器对应的文件夹。 如图所示有两种破解器,分别对应32位和64位的软件,大部

肥宅的博客 3万+

方差迭代计算公式

方差迭代计算过程推导术语约定递推公式过程推导 术语约定 (1)En=1n∑i=1nxi E_n =\frac{1}{n} \sum_{i=1}^{n}x_i \tag{1} En​=n1​i=1∑n​xi​(1) (2)F(n)=∑i=1n(x2−En) F(n) = \sum_{i=1}^{n}{(x^2-E_n)} \tag{2} F(n)=i=1∑n​(x2−En​)(2) (3)V(n)...

weixin_44479136的博客 7921

CodeForces 248B Chilly Willy

Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games

追梦赤子心 885

从零开始:使用Labelme完成图像语义分割标注全流程

本文详细介绍了如何使用Labelme工具完成图像语义分割标注的全流程,从环境安装、数据准备到核心标注操作,并重点讲解了如何将标注结果转换为PASCAL VOC等深度学习框架可用的标准数据集格式。文章还提供了关键的避坑指南和高效技巧,帮助初学者快速上手,高效产出高质量的标注数据。

weixin_29073241的博客 492

B. Chilly Willy(打表找规律)

Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games t...

一身清贫怎敢入繁华 500

uniapp - H5网页uni.getLocation报错getLocation:fail Geolocation permission denied.Get ipLocation failed.

uni.getLocation getLocation:fail Geolocation permission denied.Get ipLocation failed.,uni.getLocation定位失败,uni-app getLocation()无法获取定位,一直fail()uniapp移动端h5网页,uniApp微信内置浏览器定位失败,如何解决这个问题,uniapp h5 uni.getLocation获取位置失败怎么办,UNI-APP获取当前位置,uni.getLocation定位失败,unia

🏆 前端领域优质创作者 4243

【ArcGIS Pro微课1000例】0047:深度学习--棕榈树提取全流程

对汤加科洛瓦伊种植园每棵棕榈树的健康状况进行清查和评估,这需要花费大量的时间和劳动力。为简化此过程,将在 ArcGIS Pro 中使用深度学习模型来识别树木,然后根据植被绿度的测量值计算其健康状况。第一步是找到显示汤加科洛瓦伊的影像,该影像具有足够精细的空间和光谱分辨率来识别树木。获得此影像后,将创建训练样本并将其转换为可供深度学习模型使用的格式。为了让模型识别出它的查找任务,需要定义棕榈树的影像,以便识别相似的像素和树木大小。

智慧空间实验室 2208

Codeforce 248B Chilly Willy

题目链接:  http://codeforces.com/problemset/problem/248/B   题目大意:        给一个n,求最小的n位数,使这个数能同时被2,3,5,7整除。其中1 解题思路:         分析知这个数个位一定为零,因为它要同时被2和5整除,而一个数是否能被7整除取决于该数去掉最后一位的数减去最后一位的数的2倍的差能否被7整除。所以只需看去

cc_again的专栏 1022

csp信奥赛C++标准模板库STL案例应用1

csp信奥赛C++标准模板库STL案例应用1

王老师青少年编程 1382

CodeForces 248B Chilly Willy

B. Chilly Willy time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Chilly Willy loves playing with numbers. He

raptor 1957

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

Chilly Willy(CF-248B)

Problem Description Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came...

Alex_McAvoy的博客 353

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

CF 152 B. Chilly Willy

B. Chilly Willy time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Chilly Willy loves playing with numbers. H...

weixin_30663391的博客 157

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

CodeForces 248B - Chilly Willy - 找规律

Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games

桑榆 1451

CodeForces - 248B - Chilly Willy - (规律)

Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a few games

Orz 392

CodeForces - 248B :Chilly Willy(规律,思维)

Discription Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are 2, 3, 5 and 7. But Willy grew rather bored of such numbers, so he came up with a...

No Pain, No Gain . 350

Codeforces Round #152 (Div. 2) / 248B Chilly Willy (数论)

B. Chilly Willy http://codeforces.com/problemset/problem/248/B time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output

AC,∑ndless 1685

Codeforces Round #152 (Div. 2,B. Chilly Willy)(python大数练习)

B. Chilly Willy Chilly Willy loves playing with numbers. He only knows prime numbers that are digits yet. These numbers are2,3,5and7. But Willy grew rather bored of such numbers, so he came u...

又菜又爱玩 291

差分加模拟

题目 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int qz[N],hz[N]; int cnt[N],sum[N]; void update(int l,int r,int x,int *p) { p[l]+=x; p[r+1]-=x; } int main() { int t; cin>>t; while(t--) { int n,m,q; scanf("%d%d%d",&

Hello_wcrd的博客 1075

蓝桥杯 国赛 2021

#include<iostream> using namespace std; int xl[100],cl; long long dp[2][100][100]; int main() { long long n; int k; cin>>n>>k; while(n) { xl[++cl]=n%2; n/=2; } for(int i=0;i<=cl;i++) dp[0][i]

Hello_wcrd的博客 893
上一篇: B - Rebranding
下一篇: Palindrome Dance
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值