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
import java.util.Scanner; | |
class main{ | |
public static void main(String[] arg){ | |
Scanner in = new Scanner(System.in); | |
int limit,ans,p,fact; | |
limit = in.nextInt(); | |
while (limit>0){ | |
fact = in.nextInt(); | |
ans = 0; | |
p = 5; |
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; | |
float y; | |
scanf("%d %f",&x,&y); | |
if(x%5==0&&0.5<=y-x){ | |
printf("%.2f",y-x-0.5); | |
} | |
else{ | |
printf("%.2f",y); |
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; | |
float y; | |
scanf("%d %f",&x,&y); | |
if(x%5==0&&0.5<=y-x){ | |
printf("%.2f",y-x-0.5); | |
} | |
else{ | |
printf("%.2f",y); |
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; | |
scanf("%d",&x); | |
if (x%2==0){ | |
if (x==2){ | |
printf("NO"); | |
} | |
else{ | |
printf("YES"); |
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
limit = int(raw_input()) | |
Smax = int(raw_input()) | |
ssum = 0 | |
while limit>0: | |
score = input() | |
if score>Smax: | |
ssum +=1 | |
limit -=1 | |
else: | |
limit-=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> | |
int main(){ | |
int limit,Smax,score[100],sum,i,j; | |
sum = 0; | |
scanf ("%d",&limit); | |
scanf("%d",&Smax); | |
i =0; | |
while (limit>0){ | |
scanf("%d",&score[i]); | |
limit--; |
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> | |
int main(){ | |
int limit; | |
char word[50]; | |
scanf("%d",&limit); | |
while (limit>0){ | |
scanf("%s",&word); | |
if(strlen(word)>10){ | |
printf("%c%d%c\n",word[0],strlen(word)-2,word[strlen(word)-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
limit = input() | |
sum = 0 | |
ans = 0 | |
for i in range(limit): | |
x = map(int,raw_input().split()) | |
for i in x: | |
sum+=i | |
while sum!=0: | |
if sum<4: | |
ans+=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> | |
int main(){ | |
int limit,a,b,ans,j,i,four,temp; | |
int x[100], d[100]; | |
scanf("%d",&limit); | |
for (a=0;a<limit;a++){ | |
scanf("%d",&x[a]); | |
} | |
for(a=0;a<limit;a++){ | |
for(b=0;b<limit-a;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> | |
int main(){ | |
int limit,a,b,ans,j,i,four,temp,c,d,t; | |
int x[1000],y[1000]; | |
scanf("%d",&limit); | |
for (a=0;a<limit;a++){ | |
scanf("%d",&x[a]); | |
} | |
for (c=1;c<=limit-1;c++){ | |
d=c; |
OlderNewer