15,902,907 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by jatinp510 (Top 36 by date)
jatinp510
9-May-19 4:50am
View
unlink here is referring to deleting the file.
jatinp510
28-Nov-17 0:08am
View
soo.. how to pratice coding.
jatinp510
27-Nov-17 13:42pm
View
can u suggest me other solutions.
what else i can try.
jatinp510
27-Nov-17 13:36pm
View
#include <stdio.h>
#include<string.h>
int main()
{
int t,len,u;
scanf("%d",&t);
while(t--)
{
char a[101];
scanf("%s",&a);
len=strlen(a);
u=a[len-1];
if(u%2==0)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
sir,i have tried this.
is this correct method.
jatinp510
27-Nov-17 13:07pm
View
thnku sir.... :)
your words helps me :)
#include <stdio.h>
#include<string.h>
int main()
{
int t,len,u;
scanf("%d",&t);
while(t--)
{
char a[101];
scanf("%s",&a);
len=strlen(a);
u=a[len-1];
if(u%2==0)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
jatinp510
27-Nov-17 12:54pm
View
sir, i have tried on my level.
if someone gave me suggestion.
i just want to know how and why creating char array will help.
i just need explaination.
u r expericed peoples and can share your knowlenge with this noob.
jatinp510
27-Nov-17 12:43pm
View
sooo... is it crime to ask why for any query
jatinp510
27-Nov-17 12:30pm
View
somebody suggest me to
create char array.
how is it done.
and why its neends to be done.
jatinp510
27-Nov-17 12:06pm
View
i guess double can't store value of 10^100.
doubles don't have that much range.
jatinp510
27-Nov-17 11:54am
View
not working
jatinp510
27-Nov-17 3:12am
View
sir....
loves ur way to teach.
Always do research...
thnx...
jatinp510
27-Nov-17 2:14am
View
i don't lnow how to do this.
plzz give me soln.
jatinp510
27-Nov-17 0:38am
View
MY CODE IS
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long t,n,ans;
cin>>t;
while(t--)
{
cin>>n;
ans = ((2%1000000007) * (pow(3,n)%1000000007))%1000000007;
cout<<ans-1<<endl;
}
return 0;
}
jatinp510
27-Nov-17 0:38am
View
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
/home/jatin/programs/tri.cpp||In function ‘int main()’:|
/home/jatin/programs/tri.cpp|16|error: invalid operands of types ‘__gnu_cxx::__promote_2<int, long long int, double, double>::__type {aka double}’ and ‘int’ to binary ‘operator%’|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
jatinp510
4-Nov-17 9:27am
View
sir.. waiting for your reply.
plzz refer to the above code once.
jatinp510
4-Nov-17 9:26am
View
plzzz... refer to the ques in hackerearth.com ...
the user is restricted to use only 5 characters input if n=5.
he can't use 6 characters.
and if my code is wrong for arr[n];
then,
why it is working for 1 test case of the ques.
jatinp510
2-Nov-17 12:49pm
View
here i am changing the size of array in every test case
jatinp510
2-Nov-17 12:49pm
View
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t,n,i;
cin>>t;
while(t--){
cin>>n;
int a[n],b[n];
for(i=0;i<n;i++){
cin>>a[i];
}
for(i=0;i<n;i++){
cin>>b[i];
}
sort(a,a+n);
sort(b,b+n);
if(a[n-1]==b[n-1])
cout<<"Tie\n";
else if(a[n-1]>b[n-1])
cout<<"Bob\n";
else
cout<<"Alice\n";
}
return 0;
}
https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/warcakewalk/
jatinp510
2-Nov-17 12:36pm
View
#include <stdio.h>
int main()
{
int t,n,i;
scanf("%d",&t);
while(t--){
scanf("%d",&n);
char arr[100000];// what if i write char arr[n]
int count=0;
scanf("%s",&arr);
for(i=0;i<strlen(arr);i++){
if(arr[i]=='0')
count++;
}
printf("%d\n",count);
}
return 0;
}
jatinp510
2-Nov-17 12:34pm
View
what is the problem with changing the size of array in every test case.
and why to use dynamic memory if we have lots of memory.
jatinp510
2-Nov-17 4:20am
View
thank u..
jatinp510
2-Nov-17 4:20am
View
got it... Thank you..
jatinp510
2-Nov-17 4:19am
View
can u give me soln of this ques with int type.
And thanku :)
jatinp510
2-Sep-17 0:27am
View
which data type i have to use to hold value for 10^100.
jatinp510
1-Sep-17 10:11am
View
Okay. :)
jatinp510
1-Sep-17 10:08am
View
ITS STILL NOT WORKING
jatinp510
1-Sep-17 9:07am
View
give me some hints
jatinp510
1-Sep-17 9:07am
View
sry for that...
#include <stdio.h>
int main()
{
long n;
scanf("%d",&n);
while(n--){
double g;
scanf("%d",&g);
if(((int)g)%2==0)
printf("YES\n");
else
printf("NO\n");
}
}
Constraints
1<=n<=100000
1<=g<=10^100
here n is the no. of test case
and g is the no. to check whether its even or not.
sirr its not working.
jatinp510
28-Aug-17 11:18am
View
can u plz.. send me your code
jatinp510
27-Aug-17 9:41am
View
Deleted
actually i don't know about debugging.
plz give me an example
and how to do debugging
jatinp510
27-Aug-17 4:24am
View
thnk u... once again :)
jatinp510
27-Aug-17 3:15am
View
sir i m a begineer...
plzz.. give me some precious suggestions.. :)
jatinp510
27-Aug-17 2:18am
View
//in this code i have checked for whether this is palindrome and if its palindrome it will check whwther its odd or even
//suggest me a better code to improve my skills
#include <stdio.h>
#include <string.h>
int main()
{
int n,p,i;
scanf("%d",&n);
while(n--){
int flag=0,type=0;
int j=0;
char s[100000];
scanf("%s",&s);
j=strlen(s);
if(j==1){
printf("YES ODD\n");
}
else{
if(j%2==0){
type=1;
}
for(int i=0;i<j/2;i++){
if(s[i]==s[j-i-1])
flag++;
p=i;}
if(flag==(p+1)&&type==1)
printf("YES EVEN\n");
else if(flag==(p+1)&&type==0)
printf("YES ODD\n");
else
printf("NO\n");
}}
}
jatinp510
27-Aug-17 2:18am
View
//in this code i have checked for whether this is palindrome and if its palindrome it will check whwther its odd or even
//suggest me a better code to improve my skills
#include <stdio.h>
#include <string.h>
int main()
{
int n,p,i;
scanf("%d",&n);
while(n--){
int flag=0,type=0;
int j=0;
char s[100000];
scanf("%s",&s);
j=strlen(s);
if(j==1){
printf("YES ODD\n");
}
else{
if(j%2==0){
type=1;
}
for(int i=0;i<j/2;i++){
if(s[i]==s[j-i-1])
flag++;
p=i;}
if(flag==(p+1)&&type==1)
printf("YES EVEN\n");
else if(flag==(p+1)&&type==0)
printf("YES ODD\n");
else
printf("NO\n");
}}
}
jatinp510
27-Aug-17 1:21am
View
thnk u.. sir
jatinp510
27-Aug-17 1:21am
View
thnk u soo much
Show More