hdu4342 History repeat itself-------多校联合五
来源:互联网 发布:latex 矩阵虚线 编辑:程序博客网 时间:2024/05/22 11:01
水题就不多说什么了。
#include<iostream>#include<cstdlib>#include<stdio.h>#define ll __int64using namespace std;int main(){ int t; ll n; scanf("%d",&t); while(t--) { scanf("%I64d",&n); if(n==1) { printf("2 2\n"); continue; } ll cc=0; ll i; for(i=1;;i++) { ll res=i*i-cc; if(res>n) break; cc++; } ll kk=n+cc; ll j,k; ll ans=1;ll oo=1; for(j=1,k=2;j<cc;j++) { ans+=(k*k-(k-1)*(k-1))*oo+1; oo++;k++; } k--; if(kk>k*k) ans+=(kk-k*k)*oo; printf("%I64d %I64d\n",kk,ans); }}
- hdu4342 History repeat itself-------多校联合五
- HDU4342 History repeat itself
- HDU4342 History repeat itself数学规律题
- HDU4342——History repeat itself(数学)
- History repeat itself 解题
- hdu 4342 History repeat itself
- HDU 4342 History repeat itself
- HDOJ 4342 History repeat itself
- HDU 4342 History repeat itself
- HDU 4342 - History repeat itself
- HDOJ 4342 History repeat itself
- HDU 4342 History repeat itself 模拟
- hdu 4342 History repeat itself 模拟题
- HDU 4342 ——History repeat itself
- 【杂题】 HDOJ 4342 History repeat itself
- HDU 4342 History repeat itself 简单公式
- HDOJ 4342History repeat itself(数学)
- hdu 4342 History repeat itself(思维)
- hdu4349 lucas应用
- 刘翔是真摔还是假摔
- 使用C#的WebService实现客户端软件在线升级
- java中BigDecimal的应用
- 读《重构》,学习Collections.unmodifiableList()用法
- hdu4342 History repeat itself-------多校联合五
- 设置morenavigationcontroller的tabbaritem
- POj 3250
- 2012 Multi-University Training Contest 5-1001 hdu4340(Virus原创)
- /etc/rc.d/rc文件分析
- 自定义Eclipse背景色(黑色)
- 在新硬件上加载网卡驱动,出现e1000e: disagrees about version of symbol struct_module的解决
- gdb学习笔记
- 算法的力量