Skip to content

Commit f1c3cdd

Browse files
committed
Add solve of '1371 - Close the Doors!' URI Online judge problem
1 parent b555526 commit f1c3cdd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <stdio.h>
2+
3+
//Original problem url: https://www.urionlinejudge.com.br/judge/en/problems/view/1371
4+
//To see other problems, change the ending number to its problem number
5+
6+
int main()
7+
{
8+
int n;
9+
10+
while(true)
11+
{
12+
scanf(" %d",&n);
13+
if(n==0)
14+
return 0;
15+
printf("1");
16+
for(int i=2;i*i<=n;i++)
17+
printf(" %d",i*i);
18+
printf("\n");
19+
}
20+
21+
return 0;
22+
}

0 commit comments

Comments
 (0)