This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Euler problem 48 | |
| #include<stdio.h> | |
| #include<math.h> | |
| int long long power(int long long n); | |
| int main() | |
| { | |
| int long long ans,i,j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<math.h> | |
| // a. find out p=2^15 | |
| // b. print the last digit of p | |
| int main() | |
| { | |
| int ans,i,n,j; | |
| n=10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int main() | |
| { | |
| int n,m,i,p,fact; | |
| while(scanf("%d",&n)==1){ | |
| fact=1; | |
| m=n; | |
| for(i=1;i<=n-1;i++){ | |
| fact=(fact*i) %m; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| int long long bigmod(int long long a ,int p,int m); | |
| int main() | |
| { | |
| int long long a; | |
| int long long p,m,n,t; | |
| int c; | |
| while(scanf("%lld",&n)==1){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// UVA -10127 | |
| // Problem Name : Ones | |
| #include<stdio.h> | |
| int main() | |
| { | |
| int count,t,n; | |
| int g=11; | |
| while(scanf("%d",&n)==1){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<string.h> | |
| #include<math.h> | |
| #include<stdlib.h> | |
| #define N 20000000 | |
| char num[N]; | |
| int binary(int n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<string.h> | |
| #include<math.h> | |
| #include<stdlib.h> | |
| #define N 20000000 | |
| char num[N]; | |
| int binary(int n); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Author : Md.Shohanur Rahaman | |
| /// UVA -- 11417 (GCD) | |
| // Problem Type : Math - Easy | |
| #include<stdio.h> | |
| int gcd(int a,int b); | |
| int main() | |
| { | |
| int i,j,sum=0,n=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Author : MD.Shohanur Rahaman | |
| // URI 1217--Getline Two - Fruits | |
| #include<stdio.h> | |
| #include<string.h> | |
| int main() | |
| { | |
| float amt,avgtk,avgkg,total=0.0,t1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Author : Md.Shohanur Rahaman | |
| /// URI -- 1555 (Functions) | |
| #include<stdio.h> | |
| #include<math.h> | |
| int main() | |
| { | |
| int long long x,y,rafa,beto,carl,test,i; | |
| while(scanf("%lld",&test)==1){ |