1.

ll a;

scanf("%d",&a);

数据读入后,产生错误

2.

const ll inf=1e18;

3.

int * ll = ll

ll * int = ll

但1ll * 数字(int) = int

如100000*n得到ll,1ll*100000是错误的,要写成100000ll。

错误

 int main()
{
int n,k;
ll r;
scanf("%d%d",&n,&k);
r=**n/k;
printf("%lld",r);
return ;
}
/*
100000 3
632812544
*/

正确

 int main()
{
int n,k;
ll r;
scanf("%d%d",&n,&k);
r=100000ll*n/k;
printf("%lld",r);
return ;
}
/*
100000 3
3333333333
*/

正确

 int main()
{
int n,k,a=;
ll r;
scanf("%d%d",&n,&k);
r=1ll*a*n/k;
printf("%lld",r);
return ;
}
/*
100000 3
3333333333
*/

随机推荐

  1. 在编写wpf界面时候中出现如下错误: 类型引用不明确。至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualStateManager”的类型。请考虑调整程序集 XmlnsDefinition 特性。

    wpf中类型引用不明确.至少有两个名称空间(“System.Windows”和“System.Windows”)中已出现名为“VisualState 你是不是用了WPFToolKit?如果是的,那原因 ...

  2. python数据结构与算法第六天【栈与队列】

    1.栈和队列的原理 栈:后进先出(LIFO),可以使用顺序表和链表实现 队列:先进先出(FIFO),可以使用顺序表和链表实现 2.栈的实现(使用顺序表实现) #!/usr/bin/env python ...

  3. Java之XML操作:从XML中直接获取数据

    本文介绍如何将数据记录在XML文件中,然后通过DOM4J直接从XML中读取到数据. 依赖包: <dependency> <groupId>dom4j</groupId&g ...

  4. tensorflow中使用指定的GPU及GPU显存 CUDA_VISIBLE_DEVICES

    参考: https://blog.csdn.net/jyli2_11/article/details/73331126 https://blog.csdn.net/cfarmerreally/arti ...

  5. Python 第三方库 cp27、cp35 等文件名的含义(转)

    转自 https://blog.csdn.net/lanchunhui/article/details/62417519 转自 https://stackoverflow.com/questions/ ...

  6. DatasourceUtils类:获取连接池和数据库连接

    本工具类用于获取连接池和数据库连接 package com.itheima.utils; import java.sql.Connection; import java.sql.ResultSet; ...

  7. vuex2.0 基本使用(3) --- getter

    有的组件中获取到 store 中的state,  需要对进行加工才能使用,computed 属性中就需要写操作函数,如果有多个组件中都需要进行这个操作,那么在各个组件中都写相同的函数,那就非常麻烦,这 ...

  8. 【数学建模】day04-插值与拟合

    关于插值原理,这篇文章里总结过. 插值,是在有限个数据点的情况下,模拟出更多的点来适应实际问题的需要. 拟合,是在已知数据点基础上,以已知点处最小误差为标准,模拟出近似函数. 二者有似,实则不同,ma ...

  9. UESTC482-Charitable Exchange-bfs优先队列

    #include <cstring> #include <algorithm> #include <iostream> #include <queue> ...

  10. 非阻赛IO模型

    实例一: 只能在waitdata 阶段找到IO的解决方案 from concurrent.futures import ThreadPoolExecutor import socket server ...