Giving the N, can you tell me the answer of F(N) Input Each test case contains a single integer N(1<=N<=10^9). The input is terminated by a set starting with N...
HazelFan is given two positive integers a,b, and he wants to calculate amodb. But now he forgets the value of b and only remember the value of a, please tell hi...
B. Array Sharpening time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You’re given an array a1,…,an ...
You want to perform the combo on your opponent in one popular fighting game. The combo is the string s consisting of n lowercase Latin letters. To perform the c...
Add Odd or Subtract Even time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given two positi...
C. Restoring Permutation time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a sequence ...
In one move, you can add +1 or −1 to any of these integers (i.e. increase or decrease any number by one). You can perform such operation any (possibly, zero) nu...