Md. Arifur Rahman (Sazal)
ক্রমে ক্রমে হ্রাস পাচ্ছে বিবেক, ঘুমিয়ে পড়ছে মানবতা……
Pages
Home
ACM Algorithm
Math
E- Balagurusamy
Basic Program
Assembly Language
Gallery
My Portfolio
Thursday, 19 May 2011
acm 11547-Automatic Answer
#include<stdio.h>
int main()
{
register int t,n;
//freopen("in.txt","r",stdin);
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
n=(315*n+36962)/10;
n%=10;
if(n<0)
n=~n+1;//for converting positive
printf("%d\n",n);
}
return(0);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment