/*
LightOJ1214 Large Division
http://lightoj.com/login_main.php?url=volume_showproblem.php?problem=1214 数论 同余定理 题意:大整数取余
*
*
*
*
*/ #include <cstdio>
#include <cstring>
using namespace std;
char s[];
int main()
{
int t;
scanf("%d",&t);
long long b;
for(int i=;i<=t;i++)
{
printf("Case %d: ",i);
getchar();
scanf("%s",s);
scanf("%lld",&b);
int n=strlen(s);
long long num=0LL;
for(int i=;i<n;i++)
{
if(s[i]=='-')
continue;
num=(num*10LL+s[i]-'')%b;
}
if(num==0LL)
printf("divisible\n");
else
printf("not divisible\n");
}
return ;
}

最新文章

  1. jquery实现tab切换完整代码
  2. Generics and Collection (1)
  3. tinyXML的用法,用于解析gpx文件
  4. Failed to execute goal on project MakeFriends: Could not resolve dependencie The POM for .chengpai.jtd:jtd-service-api:jar:1.0-SNAPSHOT is missing, no dependency information available
  5. eclipse+cdt+minGW (C/C++ 编译)
  6. openstack 使用cloud init 和 console-log, nbd或者libguestfs 获取VM中的硬件信息。
  7. JavaScript从入门到忘记
  8. MyEclipse10.7 10.6导出war文件报错 “SECURITY ALERT: INTEGERITY CHECK ERROR”
  9. linkin大话设计模式--代理模式
  10. js 对象及空对象或数组及空数组的判断与比较
  11. RSA 分段加解密【解决“不正确的长度”的异常】
  12. 国内高速Maven仓库
  13. C#取整函数Math.Round、Math.Ceiling和Math.Floor 【非原创,用来收藏,分享】
  14. Asp.Net StateServer实现共同域名下Session共享
  15. Zabbix使用总结
  16. Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列目录
  17. awk和sed (十二)
  18. Hive时间函数笔记
  19. svn 操作字母的提示
  20. poj_2352 Treap

热门文章

  1. 【待解决】创建maven web工程报错
  2. Linux 定时任务的学习
  3. PHP 比 Java 的开发效率高在哪?
  4. javaBean为什么要implements Serializable
  5. [Database] 列出MSSQL所有数据库名、所有表名、所有字段名
  6. Wannafly挑战赛25 C 期望操作数 数学
  7. nginx配置访问密码,让用户输入用户名密码才能访问
  8. Spark Scala语言学习系列之完成HelloWorld程序(三种方式)
  9. Solr.NET快速入门(七)【覆盖默认映射器,NHibernate集成】
  10. mybatis 高级映射和spring整合之高级映射(4)