K-th Nya Number Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on HDU. Original ID: 3943 64-bit integer IO format: %I64d Java class name: Main Arcueid likes nya number very much.A nya number is the number which has exactly…
Supreme Number A prime number (or a prime) is a natural number greater than 11 that cannot be formed by multiplying two smaller natural numbers. Now lets define a number N as the supreme number if and only if each number made up of an non-empty subse…
You've got a string s = s1s2... s|s| of length |s|, consisting of lowercase English letters. There also are q queries, each query is described by two integers li, ri (1 ≤ li ≤ ri ≤ |s|). The answer to the query is the number of substrings of string s…
package com.code; public class Test05_1 { public static int solution(int A, int B, int K) { // handle 6,8,7 condition // handle 6,11,2 condition // handle 7,12,3 condition if(A%K==0){ return (B-A)/K + 1; }else{ int start = A+(K-A%K); if(start>B){ //…
The k-th Largest Group Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 8807 Accepted: 2875 Description Newman likes playing with cats. He possesses lots of cats in his home. Because the number of cats is really huge, Newman wants to g…
传送门 The k-th Largest Group Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 8690 Accepted: 2847 Description Newman likes playing with cats. He possesses lots of cats in his home. Because the number of cats is really huge, Newman wants…