我的系统出错了,程序运行正常,但 submittionhttp://www.spoj.com/problems/NITT
where i am going wrong on my system the program is running correctly but getting wrong answer on submittionhttp://www.spoj.com/problems/NITT2/
这是我的代码,我试图解决问题,但在提交时得到错误的答案
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
long long int n;
cin>>n;
if(n%252==0)
cout<<"Yes ";
else
cout<<"No ";
if(n%525==0)
cout<<"Yes";
else
cout<<"No";
cout<<"n";
}
return 0;
}
我的系统上哪里出了问题,程序运行正常,但在提交 NITT2 时得到错误的答案,请帮助我哪里出错了......
您错过了其中一个问题陈述:
Each line contains one number N, whose divisibility is to be tested. 1 <= N <= 10^50000
具体1 <= N <= 10^50000
你正在把这行读成一个int
;int
的存储空间太小是轻描淡写的。 您有几个选择。 您可以使用某种数据类型,该数据类型可以存储至少 10^50000 并支持除法运算。另一种选择是找到一种更好的方法,以某种巧妙的方式直接针对数据字符串测试可分割条件。
相关文章:
- 为什么当我从语句检查中删除"+ mod"时,以下程序给出错误的答案。问题链接:https://www.codechef.com/problems/FFC219B
- 如何让访问www-data用户运行使用 /dev /ttys1的流程
- Luci 无法启动请求的 CGI 程序:/www/cgi-bin/sample.cgi:执行错误
- spoj http://www.spoj.com/problems/JULKA/
- 我的系统出错了,程序运行正常,但 submittionhttp://www.spoj.com/problems/NITT
- .NET 从具有 www 接口的打印机获取数据
- 将日期格式Www-Mmm-dd hh:mm:ss yyyy转换为c++中的dd hh:mm:ss字符串
- chrome和firefox浏览器不将WWW-Authenticate标头中的kerbros令牌发送到Negotiate
- 删除`www.`来源于问题5.5中的QUrl
- Content-Type: application/x-www-form-urlencoded in curl
- 网页抓取器C++类似于Perl的WWW::Mechanize?
- SIGABRT error for语言 - https://www.codechef.com/problems/PRIME1
- 解决 SPOJ www.spoj.com/problems/PRHYME/ 的正确方法是什么?
- 当主机名不包含 www 时,WinHttp 不起作用。(错误 12029)