摘要: A 这题WA了2次,出师不利。n>k的情况很特殊,若n%k==0答案是1,否则是2,n<=k时,答案是k/n上取整 #include<bits/stdc++.h> using namespace std; int main() { int T,n,k,rest;scanf("%d",&T); whi 阅读全文
posted @ 2021-01-30 23:03 hfctf0210 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 签到场…… ABC 签到 D 设等差数列位[s+1,...,s+t],则和为t(2s+t+1)/2=n,也就是t(2s+t+1)=2n,枚举2n的因子t,判断(2n)/t是否为奇数即可,记得每次+2(因为[-i,...,i]=0) #include<bits/stdc++.h> using name 阅读全文
posted @ 2021-01-30 22:17 hfctf0210 阅读(101) 评论(0) 推荐(0) 编辑