Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B'Vasya is studying in the last class of school and soon he will take exams. He decided to study polynomials. Polynomial is a function P(x) xe2 x80 x89= xe2 x80 x89a0 xe2 x80 x89+ xe2 x80 x89a1x1 xe2 x80 x89+ xe2 x80 x89... xe2 x80 x89+ xe2 x80 x89anxn. Numbers ai are called coefficients of a polynomial, non-negative integer n is called a degree of a polynomial. Vasya has made a bet with his friends that he can solve any problem with polynomials. They suggested him the problem: "Determine how many polynomials P(x) exist with integer non-negative coefficients so that , and , where and b are given positive integers"? Vasya does not like losing bets, but he has no idea how to solve this task, so please help him to solve the problem. The input contains three integer positive numbers no greater than 1018. If there is an infinite number of such polynomials, then print "inf" without quotes, otherwise print the reminder of an answer modulo 109 xe2 x80 x89+ xe2 x80 x897.'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
8998063 |
K1000 |
E |
Dec. 6, 2014, 9:22 a.m. |
OK |
FPC |
TESTS |
40 |
15 |
0 |
|
2900 |
10245634 |
freeloop |
E |
March 12, 2015, 9:56 a.m. |
OK |
FPC |
TESTS |
40 |
30 |
0 |
|
2900 |
9101986 |
iKID_Trong |
E |
Dec. 13, 2014, 1:11 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
0 |
|
2900 |
8992901 |
TrongDuong |
E |
Dec. 5, 2014, 3:58 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
0 |
|
2900 |
11179818 |
igdor99 |
E |
May 20, 2015, 3:58 p.m. |
OK |
FPC |
TESTS |
40 |
31 |
0 |
|
2900 |
8997067 |
ljz |
E |
Dec. 6, 2014, 6:33 a.m. |
OK |
FPC |
TESTS |
40 |
31 |
0 |
|
2900 |
8980546 |
Hellyscythe |
E |
Dec. 4, 2014, 11:41 a.m. |
OK |
FPC |
TESTS |
40 |
31 |
0 |
|
2900 |
27557090 |
vjudge5 |
E |
June 4, 2017, 6:42 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27557078 |
zhouhebin |
E |
June 4, 2017, 6:42 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27350575 |
vjudge4 |
E |
May 26, 2017, 7:35 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27287992 |
vjudge1 |
E |
May 22, 2017, 4:32 p.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27284430 |
vjudge2 |
E |
May 22, 2017, 12:57 p.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27257320 |
vjudge2 |
E |
May 21, 2017, 3:11 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27172076 |
vjudge1 |
E |
May 17, 2017, 4:37 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
27153908 |
vjudge5 |
E |
May 16, 2017, 8:16 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
16216042 |
fefo |
E |
Feb. 19, 2016, 8:34 p.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
16215969 |
fefo |
E |
Feb. 19, 2016, 8:29 p.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
10182507 |
Noureldin |
E |
March 6, 2015, 7:55 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9572665 |
Mr.Temirbay |
E |
Jan. 27, 2015, 2:02 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9361676 |
bidzilya |
E |
Jan. 4, 2015, 5:28 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9281901 |
zzapcoder |
E |
Dec. 27, 2014, 8:22 a.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9281839 |
Apple_Cplus |
E |
Dec. 27, 2014, 8:16 a.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9212561 |
saketh |
E |
Dec. 21, 2014, 4:47 a.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9070867 |
LoveYY |
E |
Dec. 10, 2014, 11:22 a.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
9009898 |
Desgard_Duan |
E |
Dec. 7, 2014, 1:10 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
8986522 |
Iulia_Duta |
E |
Dec. 4, 2014, 11:12 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
8986159 |
komar007 |
E |
Dec. 4, 2014, 9:56 p.m. |
OK |
GNU C++0x |
TESTS |
40 |
15 |
0 |
|
2900 |
22291389 |
maopao |
E |
Nov. 17, 2016, 2:59 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
20989632 |
Elshiko |
E |
Sept. 29, 2016, 11:01 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
15497803 |
almasalmas |
E |
Jan. 22, 2016, 12:16 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
15412278 |
llyyff |
E |
Jan. 17, 2016, 8:45 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
14618687 |
joisino |
E |
Dec. 2, 2015, 12:22 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
12622206 |
CyberZHG |
E |
Aug. 21, 2015, 2:33 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
12622204 |
vjudge2 |
E |
Aug. 21, 2015, 2:33 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
12033790 |
tapan0007 |
E |
July 13, 2015, 9:35 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
12023077 |
harshil |
E |
July 12, 2015, 8:45 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
11611231 |
jcg |
E |
June 16, 2015, 6:46 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
0 |
|
2900 |
47421671 |
coder_getsetgo |
E |
Dec. 23, 2018, 2:51 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
30301816 |
3015218054 |
E |
Sept. 13, 2017, 8:17 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
27293319 |
vjudge4 |
E |
May 23, 2017, 3:17 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
27205629 |
boook |
E |
May 18, 2017, 11:48 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
27157229 |
vjudge5 |
E |
May 16, 2017, 10:53 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
22579544 |
Tanzir5 |
E |
Nov. 28, 2016, 3:03 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
22480381 |
Vladislao |
E |
Nov. 25, 2016, 12:03 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
0 |
|
2900 |
27157204 |
CFhM-fff |
E |
May 16, 2017, 10:52 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
102400 |
|
2900 |
27153934 |
CZWin32768 |
E |
May 16, 2017, 8:17 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
102400 |
|
2900 |
34172656 |
EpicPants |
E |
Jan. 14, 2018, 10:53 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
15 |
1945600 |
|
2900 |
47378369 |
karansiwach360 |
E |
Dec. 22, 2018, 6:59 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
30 |
0 |
|
2900 |
69680685 |
hjk1030 |
E |
Jan. 28, 2020, 3:33 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
31 |
0 |
|
2900 |
64477349 |
ivan100sic |
E |
Nov. 7, 2019, 2:48 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
31 |
0 |
|
2900 |
61749425 |
ruo |
E |
Oct. 3, 2019, 2:29 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
31 |
0 |
|
2900 |
42897065 |
Slaaava |
E |
Sept. 15, 2018, 4:09 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
31 |
0 |
|
2900 |
49779798 |
Stroustrup |
E |
Feb. 11, 2019, 5:03 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
31 |
204800 |
|
2900 |
9743068 |
Yukii |
E |
Feb. 7, 2015, 8:22 a.m. |
OK |
Java 6 |
TESTS |
40 |
77 |
0 |
|
2900 |
9743364 |
a654889339 |
E |
Feb. 7, 2015, 9:05 a.m. |
OK |
Java 6 |
TESTS |
40 |
78 |
0 |
|
2900 |
9743066 |
bnuvjudge |
E |
Feb. 7, 2015, 8:22 a.m. |
OK |
Java 6 |
TESTS |
40 |
78 |
0 |
|
2900 |
9742149 |
bnuvjudge |
E |
Feb. 7, 2015, 5:36 a.m. |
OK |
Java 6 |
TESTS |
40 |
78 |
0 |
|
2900 |
9743358 |
bnuvjudge |
E |
Feb. 7, 2015, 9:05 a.m. |
OK |
Java 6 |
TESTS |
40 |
93 |
0 |
|
2900 |
9124773 |
myp09 |
E |
Dec. 14, 2014, 6:14 a.m. |
OK |
Java 6 |
TESTS |
40 |
124 |
0 |
|
2900 |
10510611 |
megaspazz |
E |
March 29, 2015, 3:40 a.m. |
OK |
Java 7 |
TESTS |
40 |
62 |
0 |
|
2900 |
10223405 |
wonjohn.choi |
E |
March 10, 2015, 4:35 a.m. |
OK |
Java 7 |
TESTS |
40 |
77 |
0 |
|
2900 |
9742142 |
Rojo |
E |
Feb. 7, 2015, 5:35 a.m. |
OK |
Java 7 |
TESTS |
40 |
77 |
0 |
|
2900 |
9183387 |
kubusgol |
E |
Dec. 18, 2014, 6:57 a.m. |
OK |
Java 7 |
TESTS |
40 |
77 |
0 |
|
2900 |
9134276 |
kubusgol |
E |
Dec. 14, 2014, 7:12 p.m. |
OK |
Java 7 |
TESTS |
40 |
77 |
0 |
|
2900 |
8997673 |
uwi |
E |
Dec. 6, 2014, 8:15 a.m. |
OK |
Java 7 |
TESTS |
40 |
78 |
0 |
|
2900 |
9365874 |
kubusgol |
E |
Jan. 5, 2015, 1:07 p.m. |
OK |
Java 7 |
TESTS |
40 |
93 |
0 |
|
2900 |
9244459 |
mkirsche |
E |
Dec. 24, 2014, 2:36 p.m. |
OK |
Java 7 |
TESTS |
40 |
93 |
0 |
|
2900 |
9084233 |
SupreMo |
E |
Dec. 11, 2014, 5:42 p.m. |
OK |
Java 7 |
TESTS |
40 |
93 |
0 |
|
2900 |
9083068 |
bangbang_678 |
E |
Dec. 11, 2014, 3:10 p.m. |
OK |
Java 7 |
TESTS |
40 |
93 |
0 |
|
2900 |
9856401 |
A.Elahi |
E |
Feb. 15, 2015, 8:04 a.m. |
OK |
Java 8 |
TESTS |
40 |
124 |
0 |
|
2900 |
9803114 |
niyaznigmatul |
E |
Feb. 11, 2015, 9:47 p.m. |
OK |
Java 8 |
TESTS |
40 |
124 |
0 |
|
2900 |
18405501 |
donli |
E |
June 13, 2016, 4:15 a.m. |
OK |
Java 8 |
TESTS |
40 |
124 |
20582400 |
|
2900 |
8991451 |
LJH |
E |
Dec. 5, 2014, 1:33 p.m. |
OK |
Java 8 |
TESTS |
40 |
187 |
102400 |
|
2900 |
9234889 |
camypaper |
E |
Dec. 23, 2014, 5:23 p.m. |
OK |
MS C# |
TESTS |
40 |
46 |
204800 |
|
2900 |
11117522 |
SabakuNoGaara |
E |
May 16, 2015, 1:34 p.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
9541961 |
Foxy |
E |
Jan. 24, 2015, 8 p.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
9134402 |
flyover |
E |
Dec. 14, 2014, 7:28 p.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
9077630 |
yesh233 |
E |
Dec. 11, 2014, 2:55 a.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
8978876 |
Toshik |
E |
Dec. 4, 2014, 8:47 a.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
8978860 |
Toshik |
E |
Dec. 4, 2014, 8:45 a.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
0 |
|
2900 |
17685057 |
abc651279230 |
E |
May 2, 2016, 6:09 a.m. |
OK |
MS C++ |
TESTS |
40 |
15 |
2252800 |
|
2900 |
12480738 |
SmileDog |
E |
Aug. 12, 2015, 2:07 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
0 |
|
2900 |
11075533 |
dotorya |
E |
May 12, 2015, 6:50 a.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
0 |
|
2900 |
8979008 |
Toshik |
E |
Dec. 4, 2014, 8:59 a.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
0 |
|
2900 |
48113381 |
mbrc |
E |
Jan. 9, 2019, 11:03 a.m. |
OK |
PyPy 3 |
TESTS |
40 |
140 |
0 |
|
2900 |
12269494 |
vsHope |
E |
July 29, 2015, 10:04 p.m. |
OK |
Python 2 |
TESTS |
40 |
46 |
0 |
|
2900 |
8978957 |
roiti46 |
E |
Dec. 4, 2014, 8:54 a.m. |
OK |
Python 2 |
TESTS |
40 |
46 |
0 |
|
2900 |
17248250 |
DukeOfYork |
E |
April 9, 2016, 5:43 a.m. |
OK |
Python 2 |
TESTS |
40 |
61 |
4710400 |
|
2900 |
9121728 |
bochet |
E |
Dec. 13, 2014, 9:58 p.m. |
OK |
Python 2 |
TESTS |
40 |
78 |
0 |
|
2900 |
9225343 |
hellman_ |
E |
Dec. 22, 2014, 3:39 p.m. |
OK |
Python 2 |
TESTS |
40 |
155 |
0 |
|
2900 |
9022173 |
yum |
E |
Dec. 8, 2014, 8:45 p.m. |
OK |
Python 3 |
TESTS |
40 |
62 |
0 |
|
2900 |
9007281 |
orailly |
E |
Dec. 7, 2014, 8:03 a.m. |
OK |
Python 3 |
TESTS |
40 |
62 |
0 |
|
2900 |
8995707 |
miagkov |
E |
Dec. 5, 2014, 10:40 p.m. |
OK |
Python 3 |
TESTS |
40 |
62 |
0 |
|
2900 |
35883154 |
______u______ |
E |
March 3, 2018, 12:50 p.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35882822 |
______n______ |
E |
March 3, 2018, 12:44 p.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35875160 |
_____k_____ |
E |
March 3, 2018, 8:09 a.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35874994 |
_____i_____ |
E |
March 3, 2018, 8:03 a.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35871763 |
______h______ |
E |
March 3, 2018, 6:58 a.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35871708 |
______k______ |
E |
March 3, 2018, 6:57 a.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
35870991 |
______i______ |
E |
March 3, 2018, 6:40 a.m. |
OK |
Python 3 |
TESTS |
40 |
77 |
5632000 |
|
2900 |
remove filters
Back to search problems