সমস্যাটি পড়তে এবং সমাধান জমা দিতে ভিজিট করুন দ্বিমিক অনলাইন জাজ।
লিঙ্কঃ https://dimikoj.com/problems/14/
৫২টি প্রোগ্রামিং সমস্যা ও সমাধান বইতে এই সমস্যার সমাধান নিয়ে আলোচনা করা হয়েছে।
লিঙ্কঃ https://dimikoj.com/problems/14/
৫২টি প্রোগ্রামিং সমস্যা ও সমাধান বইতে এই সমস্যার সমাধান নিয়ে আলোচনা করা হয়েছে।
Sir,
উত্তর দিনমুছুনHelp me!!. It shows run-time error.I think I should take more space on string or in an array.My question is ,should I take array instead of taking string ??How can I do that!!I have tried both with array and string.First,I took letters in a string and converted to numbers and put into an array.But it did not give me any benefits.I am absolutely a new programmer.I have enrolled 1st in National High School Programming Contest 2016 Tangail Regional Senior Division.I need your help.
Regards
MD Khan
in the description, nothing is written about test case; but in the sample input/output we can see 2 as test case
উত্তর দিনমুছুনwhat's the problem !!! my output matches with the sample,nonetheless wrong answer.what can be conrner case?anybody help pls...........
উত্তর দিনমুছুনI think something is wrong in the judge data.
উত্তর দিনমুছুনজাজ ডাটায় প্রবলেম আছে মনে হয়।
উত্তর দিনমুছুনসুবিন ভাই, একটু চেক করে দেখবেন?
আমিও প্রথমবার রং অ্যানসার খাইলাম (প্রবলেমটা আমার তৈরি না)। তারপরে চেক করে দেখলাম জাজ ডাটায় সমস্যা নাই। একটা বাজে কর্নার কেস আছে। s এবং S যদিও কম্পিউটারের কাছে আলাদা অক্ষর, কিন্তু প্রবলেমসেটারের কাছে একই অক্ষর। :D
উত্তর দিনমুছুনধন্যবাদ ভাইয়া...
মুছুনআপনি এই হিন্টস টা না দিলে আমার এই কোডটাও accepted হতো না.
যেমনিভাবে ৯ ,১০ ,৪৬ ইনপুট/আউটপুট মিলার পরও কেন জানি wrong answer dekhaiteche দেখাইতেছে
জনাব,আপনার কথার মানে কি এই যে, ক্যারেক্টার ইনপুট ছোট অথবা বড় হাতের যাই হোক না কেন স্ট্রিং-থেকে আমাদেরকে উভয় ই গননা করতে হবে???
উত্তর দিনমুছুনHall of fame এ নিজের নাম দেখে খুব ভালো লাগছে... :)
উত্তর দিনমুছুনwhats the problem ....i cant find....3rd scanf not working...why?
উত্তর দিনমুছুন#include
#include
int main()
{
char first_line[100];
char secound_line[2];
int i, count, t;
scanf("%d", &t);
while(t--) {
count = 0;
scanf("%[^\n]", first_line);
scanf("%s", secound_line);
for(i = 0; i < strlen(first_line); i++) {
if(secound_line[0] == first_line[i]) {
count++;
}
}
if(count == 0) {
printf("'%c' not is present\n", secound_line[0]);
}
else {
printf("occurrence of '%c' in '%s' = %d\n", secound_line[0], first_line, count);
}
}
return 0;
}
put a space before % in the line "scanf("%[^\n]", first_line);"
মুছুনবাহ বাহ ৫৬ নাম্বারে আমার নাম ।।
উত্তর দিনমুছুনএকটা Hints সবাইকে দিয়ে রাখি ... সি তে multiple test case এ getchar() , scanf এর আগে ইউজ করবেন , নয়তো scanf() ঠিক মতো কাজ করবে না ।।
ar string এর ভিতর character upper case and lower case দুটোর জন্যই check করতে হবে ।। সুবিন ভাই যেটা বললেন S and s এইখানে একই ।।
এবার নিজে নিজে code করে ফেলুন ।। ধন্যবাদ :)
What's Wrong?
উত্তর দিনমুছুনsuggest me please
#include
int main()
{
char fl[10001];
char sl[2];
char r;
int i,T,j,count;
scanf("%d",&T);
for(i=1; i<=T; i++){
scanf(" %[^\n]", fl);
scanf("%s",sl);
count = 0;
for(j=0; j0){
printf("Occurrence of '%c' in '%s' = %d\n", r, fl, count);
}
else{
printf("'%c' is not present\n", sl[0]);
}
}
return 0;
}
accepted__ https://ideone.com/Bk4xPQ
উত্তর দিনমুছুনকিন্তু
wrong ans__ https://ideone.com/cWadCi -এই কোডে বাগ কোথায় ?