You are not logged in. Please login at to post your questions!


CIELAB -any missing test case here?

include <iostream>

include <bits stdc++.h="">

using namespace std;

int main() { int a ,b; cin>>a>>b; int t=a-b; int k=t%10; if(k==0) { t+=1; // cout<<t; } else { t=t-1; } cout<<t;

// cout << "Hello world!" << endl; return 0; }

asked 14 Sep '18, 12:42

djeet_123's gravatar image

accept rate: 0%

Yes. As it stands you can end up with an answer that is zero, which is not a positive integer as specified.

This is also specifically mentioned in the Editorial for this problem. Search the discussion board for "CIELAB" to find it.


answered 14 Sep '18, 22:38

joffan's gravatar image

accept rate: 13%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 14 Sep '18, 12:42

question was seen: 61 times

last updated: 14 Sep '18, 22:38