当前位置:网站首页>不知道取什么名字
不知道取什么名字
2022-08-08 05:42:00 【一条小小yu】



#include<bits/stdc++.h>
#pragma GCC optimize(3)
using namespace std;
typedef long long ll;
typedef double db;
ll n,t,d,k;
ll a,c;
int main()
{
scanf("%lld",&t);
while(t--)
{
scanf("%lld%lld%lld%lld",&n,&a,&d,&k);
c=ceil(cbrt(a));
if(c*c*c<a)
{
c=c+1;
}
ll sum=c*n;
for(ll i=2; i<=n; i++)
{
a=a+d+(i-2)*k;
while(c*c*c<a)c++;
sum=sum^(c*(n-i+1));
}
printf("%lld\n",sum);
}
return 0;
}
边栏推荐
- 日常bug小结:
- Unity-CharacterController (Character Controller)
- 121道分布式面试题和答案
- Matlab simulation of photovoltaic mppt maximum power control based on disturbance observation method
- TSF微服务治理实战系列(二)——服务路由
- 邮件钓鱼上线cobalstrike
- 121 distributed interview questions and answers
- 缓存存在的问题:缓存穿透、缓存击穿、缓存雪崩
- Week 9 10 Neural Networks
- 数据库系统原理与应用教程(080)—— MySQL 练习题:操作题 186-193(二十四):综合练习
猜你喜欢

Rust development - Struct usage example

121 distributed interview questions and answers

28. Anomaly detection

Several postman features worth collecting will help you do more with less!

说说Redis分布式锁的原理和实现蚂【蚁金服三面】

《动机与人格》笔记(二)——认识和理解的欲望

Unity鼠标光标使用学习

KDD‘22推荐系统论文梳理(24篇研究&36篇应用论文)

值得收藏的几个postman特色功能帮你事半功倍!

14.Unity2D 横版 粒子系统特效 飙血粒子+高处落地粒子+对象池管理所有粒子
随机推荐
什么是 DevOps?看这一篇就够了!
Single host docker builds redis-cluster
Week 8 Transformer Language Models and Implications
Sqlmap + dnslog injection of repetition
阿里云的数据库怎么提高访问速度的本地的打开的方式是www.zgysffm.com怎样的?
Distributed Transactions: A Reliable Message Eventual Consistency Scheme
How to batch import files and rename them all to the same file name
14. Unity2D horizontal version particle system special effects: blood particles + high landing particles + object pool to manage all particles
Leetcode sword 】 refers to the Offer (special commando) summary
Week 8 Transformer Language Models and Implications
【无标题】暂时没有想好叫什么名字
tracepoint: 定义函数及调用示例
Eighteen, OIDC OAuth2 】 【 the understanding of the application
缓存存在的问题:缓存穿透、缓存击穿、缓存雪崩
Typescript namespace
【数学建模】微分方程求解 | dsolve函数 | ode45函数
仿QQ好友列表,QListWidget!
The big and small end problem caused by union union
28.异常检测
KDD'22 Recommendation System Papers (24 Research & 36 Application Papers)