Aditya_Dave's blog

By Aditya_Dave, history, 4 months ago, In English

Welcome to the Editorial of IPC junior-2 (2025–26).

A. Seventy Percent Rule

Author: Femm_12

Problem Tags
Solution
Code

B. Aditya and Raj's Digit Sum challenge (Easy Version)

Author: Aditya_Dave, Raj_Patel_7807.

Problem Tags
Solution
Code

C. The Palindrome Challenge (Easy Version)

Author: Raj_Patel_7807

Problem Tags
Solution
Code

D. The Long-Arm Handshake

Author: zeel.18

Problem Tags
Solution
Code

E. Aditya and Raj's Digit Sum challenge (Hard Version)

Author: Aditya_Dave, Raj_Patel_7807

Problem Tags
Solution
Code

F. The Palindrome Challenge (Hard Version)

Author: Raj_Patel_7807

Problem Tags
Solution
Code

Explanations of all solutions contributed by Aditya_Dave.

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it

By Aditya_Dave, history, 16 months ago, In English

697A - Pineapple Incident ==============: In this question, we are told that the pineapple barks at t, t+s, t+s+1, and so on. One way is to check for each and every multiple of s by applying a for loop, but it will be too lengthy and time consuming. Another way is:

if t+n*s=x or t+n*s+1=x,(where n is any natural number), then it can be clearly seen that (x-t) or (x-t-1) is divisible by s. But here we need to be careful when t>x. This will be our edge case. If t>x, then the pineapple will not bark at the time x. So we can clearly output NO as our answer. If this condition (x-t)%s==0 || ((x-t-1)%s==0 && (x-t-1)/s!=0) satisfies, then we can clearly print YES, else we can print NO. 298127756

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it