Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges It's Hip to be Square

C (clang), 189 181 176 173 bytes i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");break;}if(x!=z[i]&...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

Answer
#12: Post edited by user avatar General Sebast1an‭ · 2021-08-05T14:16:50Z (over 3 years ago)
  • # [C (clang)], <s>189</s> <s>181</s> 176 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/9WuFojCXK)
  • **If libraries also count in the code, the total byte count will be <s>226</s> <s>218</s> 213.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], <s>189</s> <s>181</s> <s>176</s> 173 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");break;}if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/qJhLmYYeE)
  • **If libraries also count in the code, the total byte count will be <s>226</s> <s>218</s> <s>213</s> 210.**
  • [C (clang)]: http://clang.llvm.org/
#11: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:27:50Z (over 3 years ago)
  • # [C (clang)], <s>189</s> 181 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/YM_TcXAEE)
  • **If libraries also count in the code, the total byte count will be <s>226</s> 218.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], <s>189</s> <s>181</s> 176 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/9WuFojCXK)
  • **If libraries also count in the code, the total byte count will be <s>226</s> <s>218</s> 213.**
  • [C (clang)]: http://clang.llvm.org/
#10: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:23:27Z (over 3 years ago)
  • # [C (clang)], <s>189</s> 181 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be <s>226</s> 218.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], <s>189</s> 181 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/YM_TcXAEE)
  • **If libraries also count in the code, the total byte count will be <s>226</s> 218.**
  • [C (clang)]: http://clang.llvm.org/
#9: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:22:48Z (over 3 years ago)
  • # [C (clang)], 189 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be 226.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], <s>189</s> 181 bytes
  • <!-- language-all: lang-c -->
  • i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be <s>226</s> 218.**
  • [C (clang)]: http://clang.llvm.org/
#8: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:18:15Z (over 3 years ago)
  • # [C (clang)], 191 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=1000001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be 228.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], 189 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=10001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be 226.**
  • [C (clang)]: http://clang.llvm.org/
#7: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:17:02Z (over 3 years ago)
  • # [C (clang)], 185+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/EMWyITn9K)
  • You can assign `n` in whatever value to determine how many squares you're giving `z[]` to test the input. In my program, I wrote `n=100`, so I can get squares from 0 to 99, and giving me 187 bytes.
  • **If libraries also count in the code, the total byte count will be 222+.**
  • [C (clang)]: http://clang.llvm.org/
  • # [C (clang)], 191 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=1000001;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/nPzMwyM0a)
  • **If libraries also count in the code, the total byte count will be 228.**
  • [C (clang)]: http://clang.llvm.org/
#6: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:13:09Z (over 3 years ago)
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than how I write code before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values. Here, I have `n=100` so I can have all squares from 0 to 99, giving me 203 bytes.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
  • # [C (clang)], 185+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){z[i]=pow(y,2);}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!](https://onlinegdb.com/EMWyITn9K)
  • You can assign `n` in whatever value to determine how many squares you're giving `z[]` to test the input. In my program, I wrote `n=100`, so I can get squares from 0 to 99, and giving me 187 bytes.
  • **If libraries also count in the code, the total byte count will be 222+.**
  • [C (clang)]: http://clang.llvm.org/
#5: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:02:25Z (over 3 years ago)
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values. Here, I have `n=100` so I can have all squares from 0 to 99, giving me 203 bytes.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than how I write code before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values. Here, I have `n=100` so I can have all squares from 0 to 99, giving me 203 bytes.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
#4: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:01:15Z (over 3 years ago)
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values. Here, I have `n=100` so I can have all squares from 0 to 99, giving me 203 bytes.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
#3: Post edited by user avatar General Sebast1an‭ · 2021-08-05T12:00:03Z (over 3 years ago)
  • # [C (clang)], 203 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
  • # [C (clang)], 201+ bytes (read description)
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
#2: Post edited by user avatar General Sebast1an‭ · 2021-08-05T11:58:41Z (over 3 years ago)
  • # [C (clang)], 203 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
  • # [C (clang)], 203 bytes
  • <!-- language-all: lang-c -->
  • i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}
  • [Try it online!][TIO-kryv16yv]
  • Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.
  • However, `n` can be assigned whatever you want if you want higher (or lower) values.
  • [C (clang)]: http://clang.llvm.org/
  • [TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"
#1: Initial revision by user avatar General Sebast1an‭ · 2021-08-05T11:54:21Z (over 3 years ago)
# [C (clang)], 203 bytes

<!-- language-all: lang-c -->

    i,j,k,n,x,y;main(){scanf("%i",&x);j=1,y=1,n=100;int z[n];for(i=0;i<n;i++,y++){for(k=0;k<y;k++){j*=y;}z[i]=j;}for(i=0;i<n;i++){if(x==z[i]){puts("True");return 0;}else if(x!=z[i]&&i==n-1){puts("False");}}}

[Try it online!][TIO-kryv16yv]

Since `<math.h>` in TIO has no `pow()` for whatever reason, I improvised using a for-loop which adds more bytes but it was worth it. Even my code here looks a lot better than what I do before.

[C (clang)]: http://clang.llvm.org/
[TIO-kryv16yv]: https://tio.run/##XcvBboMwEATQe76CEAXZxYlAOS7bY78gtygHi5iwQDYVGAkH@dupqRRV6mEub2bKQ9lpvi874rIbbyYqHtrWx/pz8yeDvdEz0EKqUa1iNSkHD00s5DyUmisR7ylWySShwVy5EMY8y4DYRq8LX6F69oIwQMFAaapcmsp5xTZgWzhoV2g@0IF/XeiKDfh/HzlTJSbEtZbz92gHEZ/70cQSemPHnqMMvOkGE6277e8uSQiRD/l7/6VDHw7e@2U5/QA "C (clang) – Try It Online"