记录编号 |
22108 |
评测结果 |
AAAAAAAAAA |
题目名称 |
502.长路上的灯 |
最终得分 |
100 |
用户昵称 |
Pom |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.090 s |
提交时间 |
2010-11-17 11:10:14 |
内存使用 |
0.26 MiB |
显示代码纯文本
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
using namespace std;
int n,ans,t,i;
double r,re;
int main()
{
freopen("light.in","r",stdin);
freopen("light.out","w",stdout);
scanf("%d",&n);
for (i=1;i<=n;i++)
{
scanf("%lf%d",&r,&t);
re=0;
for (;t>0;t--)
{
re+=r;
ans=ans xor (int) re;
}
}
printf("%d\n",ans);
return 0;
}