CHFJB – Editorial
PROBLEM LINK:PracticeContestAuthor:Arkapravo GhoshTester:Aparup GhoshEditorialist:Aparup GhoshDIFFICULTY:EASYPREREQUISITES:Primality test, factorizationPROBLEM:Given a positive integer N, you need to...
View ArticleNeed solution which require math..
You are given a number N, we have to find the sum modulo 1e9+7 of a function which takes all number from 1 to N as input, function: given a number m calculate the x modulo m, where x is the product of...
View ArticleGRDPRTY - Editorial
PROBLEM LINK:PracticeContestAuthor:Arkapravo GhoshEditorialist:Arkapravo GhoshDIFFICULTY:EASY PREREQUISITES:Math Triangular NumberPROBLEM:The problem asks to find out the no. of elements in one side of...
View ArticleARRPROB – Editorial
PROBLEM LINK:PracticeContestAuthor:Md ShahidEditorialist:Arkapravo GhoshDIFFICULTY:SIMPLEPREREQUISITES:ArrayPROBLEM:An array on N elements is given. We need to print an array of N elements where the...
View ArticleCode for SPELLBOB giving WRONG ANSWER in judge but working in IDE. What do I...
My code for SPELLBOB is giving me a WRONG ANSWER (WA) in the judge but when I run it against the input given to us to test in the CodeChef IDE I get the right answers. My understanding of the problem...
View ArticleCodeChef beginner - The Lead Game (TLG) whats wrong in my code?
#include "bits/stdc++.h" using namespace std; int main() { int t, s1, s2, lead; cin >> t; vector<int>p1; vector<int>p2; while(t--) { cin >> s1 >> s2; if(s1> s2) {...
View ArticleTEST: Getting ce
Hi,I used Eclipse to write the program Life, Universe, Everything. It compiles and works perfectly. However, when I submit, I get the messageMain.java:4: class LifeUniverseEverything is public, should...
View Articlegetting "Wrong answer!"
import java.util.Scanner; class ATM { public static void main(String args[]) { Scanner obj = new Scanner(System.in); System.out.println("Enter amount to be withdrawn"); int wit = obj.nextInt();...
View ArticleGetting a wrong answer in Bytelandian gold coins problem
test_case = 10 arr = [] for i in range(0,test_case): coin = int(input()) dollars = int(coin/2) + int(coin/3) + int(coin/4) if(dollars<coin): dollars = coin arr.append(dollars) for i in...
View ArticleMISKEY-Editorial
PROBLEM LINK:ContestPracticeAuthor: Amit Kumar PandeyEditorialist: Amit Kumar PandeyTester: Arkapravo GhoshDificultyMidiumPREREQUISITESAd-hoc, DictionaryPROBLEMSThe issue with the keyboard is that the...
View ArticleI guess the logic and syntax are correct, but it shows the wrong answer, can...
include<iostream>using namespace std; int main(){ int n; cin>>n; int no[n][2]; int div[n]; for(int i=0; i<n; i++){="" for(int="" j="0;" j<2;="" j++){="" cin="">>no[i][j]; } }...
View ArticleDo i need to write different code for different subtasks of a...
I solved a problem from august long challenge.....my answer was partially accepted....it showed that subtask #2 have wrong answer...so i want to ask do i need to write different code for different...
View ArticlePROBLEMS in aug challenge div2
i have written code for this prob but it is not accepting. i dont know whats the mistake i am getting correct ans for all my custom test cases. please someone provide some tricky test case with ans.
View ArticleC++ Exception Handling
Can someone help me out in C++ ?suppose i want to check whether an input number ( by user ) is even or not.. then i ask user to input a number ( only digit numbers )..and then i can simply check.But...
View Articlegetting a runtime error
include<stdio.h>include<string.h>int main() { int T,i; scanf("%d",&T); for(i=0;i<T;i++) { int K,N,j; //array of strings scanf("%d%d",&N,&K); char A[N][100]; char...
View ArticleThe hardest gcd problem-??
I recently attempted the question the hardest gcd problem. I made a programme which first calculates the gcd of the entire array. then it factorises this gcd and checks whether all its factors are less...
View Articlelargest good subarray - score 15% - what is the basis of scoring?
My code solves many test cases. But score is only 15%. May i know the method of scoring and code suggestionHere is my code:/************Welcome to GDB Online. GDB online is an online compiler and...
View Articlerainbow problom(i am getting a wrong answer)
include<stdio.h>include<string.h>int main() { int T,i; scanf("%d",&T); for(i=0;i<T;i++) { int K,N,j,flag=0; scanf("%d",&N); int A[N]; for(j=0;j<N;j++) { scanf("%d",&A[j]);...
View Article