Problem:-
Jadoo, the space alien has challenged Koba to a friendly duel. He asks Koba to write a program to print out all numbers from 70
to 80
. Knowing perfectly well how easy the problem is, the Jadoo adds his own twist to the challenge. He asks Koba to write the program without using a single number in his program and also restricts the character limit to 100
.
Checker Code:
#include <iostream>
using namespace std;
int main() {
char ch;
int c,score;
int flag = 0;
while(scanf("%c",&ch)!=EOF)
{
if(ch >= '0' && ch <= '9')
{
flag = 1;
break;
}
else if(ch<=32) continue;
else c++;
}
if(flag == 1)
{ cout<<0; return 0;}
if(c <= 100)
score = 100;
else score= 50;
cout<<score;
return 0;
}
Time Limit:5.0 sec(s) for each input file.
Memory Limit:256 MB
Source Limit:1024 KB
Solution:-
x=ord('F')
y=ord('Q')
for i in range(x,y):
print(i)
0 Comments