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
| x = gets.split("") | |
| x.downcase() | |
| ans="" | |
| for i in x | |
| if i=="a" or i=="e" or i=="i" or i=="o" or i=="u" or i=="y" | |
| ans+="" | |
| else | |
| ans+="."+i | |
| end | |
| end |
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
| ans = "" | |
| x = raw_input() | |
| x = x.lower() | |
| for i in x: | |
| if i == "a" or i== "e" or i== "i" or i== "u" or i=="o" or i=="y": | |
| ans+="" | |
| else: | |
| ans+= "."+i | |
| print ans |
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 <ctype.h> | |
| int main(){ | |
| char x[100]; | |
| int i; | |
| scanf("%s",&x); | |
| for (i=0;i<strlen(x);i++){ | |
| if (tolower(x[i])== 'a' || tolower(x[i])== 'e'||tolower(x[i])== 'i'||tolower(x[i])== 'o'||tolower(x[i])== 'u'||tolower(x[i])== 'y'){ | |
| printf(""); |
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 x,y=5; | |
| char Name[5][20]={ | |
| "Sheldon", | |
| "Leonard", | |
| "Penny", | |
| "Rajesh", | |
| "Howard" | |
| }; |
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 x,cap=0,maxcap=0,passen[2]; | |
| scanf("%d",&x); | |
| while (x>0){ | |
| scanf("%d%d",&passen[0],&passen[1]); | |
| cap-=passen[0]; | |
| cap+=passen[1]; | |
| if (cap>maxcap){ | |
| maxcap=cap; |
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 gcd(int a,int b){ | |
| int c; | |
| while(a!=0){ | |
| c=a; | |
| a=b%a; | |
| b=c; | |
| } | |
| return b; | |
| } |
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 <ctype.h> | |
| int chk(char word[]){ | |
| int i,n=0; | |
| for (i=0;i<strlen(word);i++){ | |
| if(islower(word[i])){ | |
| 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> | |
| int chk(int ans[100],int k){ | |
| int i,n=0; | |
| for(i=0;i<3;i++){ | |
| if (ans[i]==1) | |
| n++; | |
| } | |
| return n; | |
| } | |
| int main(){ |
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
| def chk_hit(do,d): | |
| i=0 | |
| hit=0 | |
| while d!=0: | |
| if d%do ==0 and dragon[d-1]==1 : | |
| hit+=1 | |
| dragon[d-1]=0 | |
| d-=1 | |
| return hit |
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 chk_hit(int dod, int d, int dragon[]){ | |
| int hit=0; | |
| while (d!=0){ | |
| if (d%dod==0 && dragon[d-1]==1){ | |
| hit++; | |
| dragon[d-1]=0; | |
| } | |
| d--; | |
| } |