QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#786088#4667. Eggs Repaintingucup-team266#AC ✓29ms67464kbC++231.6kb2024-11-26 20:14:222024-11-26 20:14:30

Judging History

你现在查看的是最新测评结果

  • [2024-11-26 20:14:30]
  • 评测
  • 测评结果:AC
  • 用时:29ms
  • 内存:67464kb
  • [2024-11-26 20:14:22]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
const ll mod=998244353;
ll C[2020][2020];
ll val[2020];
ll f[2020][2020];
ll fact[2020];
ll pw[2020];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	for(int i=0;i<2020;i++)
		C[i][i]=C[i][0]=1;
	for(int i=2;i<2020;i++)
		for(int j=1;j<i;j++)
			C[i][j]=(C[i-1][j]+C[i-1][j-1])%mod;
	for(int i=0;i<2020;i++)
	{
		f[i][0]=0;
		f[i][i]=1;
	}
	for(int i=2;i<2020;i++)
		for(int j=1;j<i;j++)
			f[i][j]=(f[i-1][j]*j+f[i-1][j-1])%mod;
	fact[0]=1;
	for(int i=1;i<2020;i++)
		fact[i]=fact[i-1]*i%mod;
	int n,k;
	cin>>n>>k;
	pw[0]=1;
	for(int i=1;i<2020;i++)
		pw[i]=pw[i-1]*n%mod;
	ll ans=0;
	for(int i=1;i<=min(n,k);i++)
		for(int j=1;j<=i;j++)
		{
			ll ways=C[n][i]*f[k][i]%mod*fact[i]%mod;
			ll ways2=f[i][j]*pw[k-i]%mod;
			ans=(ans+ways*ways2%mod*fact[j]%mod*C[n][j]%mod*(n-i+j))%mod;
			ans=(ans+mod-ways*ways2%mod*fact[j]%mod*C[n-1][j-1]%mod*(n-i)%mod)%mod;
		}
	cout<<ans<<'\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 67332kb

input:

4 3

output:

11656

result:

ok 1 number(s): "11656"

Test #2:

score: 0
Accepted
time: 11ms
memory: 66308kb

input:

1875 1065

output:

604459648

result:

ok 1 number(s): "604459648"

Test #3:

score: 0
Accepted
time: 16ms
memory: 66368kb

input:

1281 1366

output:

794264570

result:

ok 1 number(s): "794264570"

Test #4:

score: 0
Accepted
time: 8ms
memory: 66844kb

input:

326 444

output:

585764150

result:

ok 1 number(s): "585764150"

Test #5:

score: 0
Accepted
time: 8ms
memory: 66536kb

input:

1342 124

output:

319299580

result:

ok 1 number(s): "319299580"

Test #6:

score: 0
Accepted
time: 8ms
memory: 67052kb

input:

386 1016

output:

368940820

result:

ok 1 number(s): "368940820"

Test #7:

score: 0
Accepted
time: 7ms
memory: 66572kb

input:

1078 236

output:

966299801

result:

ok 1 number(s): "966299801"

Test #8:

score: 0
Accepted
time: 7ms
memory: 67336kb

input:

286 114

output:

110001723

result:

ok 1 number(s): "110001723"

Test #9:

score: 0
Accepted
time: 12ms
memory: 67336kb

input:

1024 1434

output:

77018908

result:

ok 1 number(s): "77018908"

Test #10:

score: 0
Accepted
time: 16ms
memory: 66780kb

input:

1328 1285

output:

921021531

result:

ok 1 number(s): "921021531"

Test #11:

score: 0
Accepted
time: 0ms
memory: 66452kb

input:

1984 201

output:

820381269

result:

ok 1 number(s): "820381269"

Test #12:

score: 0
Accepted
time: 8ms
memory: 66392kb

input:

834 1083

output:

958107563

result:

ok 1 number(s): "958107563"

Test #13:

score: 0
Accepted
time: 7ms
memory: 66092kb

input:

444 378

output:

233676262

result:

ok 1 number(s): "233676262"

Test #14:

score: 0
Accepted
time: 8ms
memory: 66824kb

input:

439 1347

output:

434448580

result:

ok 1 number(s): "434448580"

Test #15:

score: 0
Accepted
time: 8ms
memory: 66304kb

input:

1491 400

output:

449765212

result:

ok 1 number(s): "449765212"

Test #16:

score: 0
Accepted
time: 8ms
memory: 66840kb

input:

1300 116

output:

382127985

result:

ok 1 number(s): "382127985"

Test #17:

score: 0
Accepted
time: 7ms
memory: 66092kb

input:

604 1374

output:

78845338

result:

ok 1 number(s): "78845338"

Test #18:

score: 0
Accepted
time: 7ms
memory: 66588kb

input:

512 335

output:

363193596

result:

ok 1 number(s): "363193596"

Test #19:

score: 0
Accepted
time: 11ms
memory: 66456kb

input:

1156 811

output:

256156969

result:

ok 1 number(s): "256156969"

Test #20:

score: 0
Accepted
time: 8ms
memory: 66824kb

input:

330 385

output:

176387814

result:

ok 1 number(s): "176387814"

Test #21:

score: 0
Accepted
time: 9ms
memory: 66184kb

input:

885 577

output:

346349124

result:

ok 1 number(s): "346349124"

Test #22:

score: 0
Accepted
time: 4ms
memory: 66088kb

input:

310 1593

output:

108014116

result:

ok 1 number(s): "108014116"

Test #23:

score: 0
Accepted
time: 8ms
memory: 67084kb

input:

388 1736

output:

513947142

result:

ok 1 number(s): "513947142"

Test #24:

score: 0
Accepted
time: 0ms
memory: 66048kb

input:

280 1579

output:

452330855

result:

ok 1 number(s): "452330855"

Test #25:

score: 0
Accepted
time: 11ms
memory: 66832kb

input:

1672 1433

output:

938637774

result:

ok 1 number(s): "938637774"

Test #26:

score: 0
Accepted
time: 15ms
memory: 66964kb

input:

1058 1561

output:

723799897

result:

ok 1 number(s): "723799897"

Test #27:

score: 0
Accepted
time: 4ms
memory: 66856kb

input:

1392 852

output:

670351856

result:

ok 1 number(s): "670351856"

Test #28:

score: 0
Accepted
time: 11ms
memory: 66340kb

input:

1814 1183

output:

225014104

result:

ok 1 number(s): "225014104"

Test #29:

score: 0
Accepted
time: 14ms
memory: 67044kb

input:

1898 1545

output:

122425281

result:

ok 1 number(s): "122425281"

Test #30:

score: 0
Accepted
time: 4ms
memory: 66660kb

input:

38 1735

output:

804496205

result:

ok 1 number(s): "804496205"

Test #31:

score: 0
Accepted
time: 7ms
memory: 66244kb

input:

1878 1060

output:

162343638

result:

ok 1 number(s): "162343638"

Test #32:

score: 0
Accepted
time: 8ms
memory: 66512kb

input:

353 1895

output:

148504395

result:

ok 1 number(s): "148504395"

Test #33:

score: 0
Accepted
time: 8ms
memory: 66884kb

input:

12 275

output:

876959212

result:

ok 1 number(s): "876959212"

Test #34:

score: 0
Accepted
time: 23ms
memory: 66284kb

input:

1954 1810

output:

755282661

result:

ok 1 number(s): "755282661"

Test #35:

score: 0
Accepted
time: 12ms
memory: 66028kb

input:

1539 996

output:

414637712

result:

ok 1 number(s): "414637712"

Test #36:

score: 0
Accepted
time: 11ms
memory: 66596kb

input:

1603 645

output:

830337356

result:

ok 1 number(s): "830337356"

Test #37:

score: 0
Accepted
time: 8ms
memory: 67232kb

input:

1784 824

output:

425203679

result:

ok 1 number(s): "425203679"

Test #38:

score: 0
Accepted
time: 7ms
memory: 66636kb

input:

485 1833

output:

467648525

result:

ok 1 number(s): "467648525"

Test #39:

score: 0
Accepted
time: 8ms
memory: 66124kb

input:

551 1081

output:

738566136

result:

ok 1 number(s): "738566136"

Test #40:

score: 0
Accepted
time: 8ms
memory: 67240kb

input:

601 158

output:

812005202

result:

ok 1 number(s): "812005202"

Test #41:

score: 0
Accepted
time: 8ms
memory: 66596kb

input:

402 268

output:

604256490

result:

ok 1 number(s): "604256490"

Test #42:

score: 0
Accepted
time: 11ms
memory: 67172kb

input:

1109 1306

output:

169649722

result:

ok 1 number(s): "169649722"

Test #43:

score: 0
Accepted
time: 11ms
memory: 66568kb

input:

1127 1680

output:

584588605

result:

ok 1 number(s): "584588605"

Test #44:

score: 0
Accepted
time: 8ms
memory: 66716kb

input:

425 83

output:

336612167

result:

ok 1 number(s): "336612167"

Test #45:

score: 0
Accepted
time: 19ms
memory: 67000kb

input:

1356 1726

output:

759078268

result:

ok 1 number(s): "759078268"

Test #46:

score: 0
Accepted
time: 6ms
memory: 67212kb

input:

1429 292

output:

368151012

result:

ok 1 number(s): "368151012"

Test #47:

score: 0
Accepted
time: 9ms
memory: 66112kb

input:

1010 802

output:

730158892

result:

ok 1 number(s): "730158892"

Test #48:

score: 0
Accepted
time: 7ms
memory: 67156kb

input:

1375 739

output:

589268934

result:

ok 1 number(s): "589268934"

Test #49:

score: 0
Accepted
time: 11ms
memory: 66012kb

input:

1593 788

output:

442887710

result:

ok 1 number(s): "442887710"

Test #50:

score: 0
Accepted
time: 18ms
memory: 67048kb

input:

1396 1731

output:

623014512

result:

ok 1 number(s): "623014512"

Test #51:

score: 0
Accepted
time: 7ms
memory: 66728kb

input:

1278 568

output:

241372627

result:

ok 1 number(s): "241372627"

Test #52:

score: 0
Accepted
time: 8ms
memory: 67112kb

input:

68 136

output:

396006676

result:

ok 1 number(s): "396006676"

Test #53:

score: 0
Accepted
time: 10ms
memory: 66688kb

input:

1369 903

output:

482948904

result:

ok 1 number(s): "482948904"

Test #54:

score: 0
Accepted
time: 4ms
memory: 66612kb

input:

1698 247

output:

399635018

result:

ok 1 number(s): "399635018"

Test #55:

score: 0
Accepted
time: 11ms
memory: 66096kb

input:

1313 1071

output:

323623357

result:

ok 1 number(s): "323623357"

Test #56:

score: 0
Accepted
time: 3ms
memory: 67000kb

input:

584 379

output:

608714564

result:

ok 1 number(s): "608714564"

Test #57:

score: 0
Accepted
time: 11ms
memory: 67320kb

input:

1618 1149

output:

921329648

result:

ok 1 number(s): "921329648"

Test #58:

score: 0
Accepted
time: 8ms
memory: 66964kb

input:

83 1625

output:

325838908

result:

ok 1 number(s): "325838908"

Test #59:

score: 0
Accepted
time: 10ms
memory: 66396kb

input:

1037 1584

output:

264115938

result:

ok 1 number(s): "264115938"

Test #60:

score: 0
Accepted
time: 8ms
memory: 67092kb

input:

1528 184

output:

768375389

result:

ok 1 number(s): "768375389"

Test #61:

score: 0
Accepted
time: 24ms
memory: 66396kb

input:

1724 1965

output:

784524587

result:

ok 1 number(s): "784524587"

Test #62:

score: 0
Accepted
time: 8ms
memory: 67088kb

input:

666 217

output:

572190290

result:

ok 1 number(s): "572190290"

Test #63:

score: 0
Accepted
time: 3ms
memory: 66176kb

input:

158 663

output:

1941956

result:

ok 1 number(s): "1941956"

Test #64:

score: 0
Accepted
time: 4ms
memory: 66720kb

input:

758 269

output:

549172133

result:

ok 1 number(s): "549172133"

Test #65:

score: 0
Accepted
time: 18ms
memory: 66464kb

input:

1513 1997

output:

152193228

result:

ok 1 number(s): "152193228"

Test #66:

score: 0
Accepted
time: 17ms
memory: 66348kb

input:

1874 1481

output:

681894916

result:

ok 1 number(s): "681894916"

Test #67:

score: 0
Accepted
time: 3ms
memory: 67116kb

input:

853 526

output:

503427023

result:

ok 1 number(s): "503427023"

Test #68:

score: 0
Accepted
time: 8ms
memory: 66580kb

input:

629 514

output:

952044283

result:

ok 1 number(s): "952044283"

Test #69:

score: 0
Accepted
time: 12ms
memory: 67464kb

input:

907 1562

output:

173342153

result:

ok 1 number(s): "173342153"

Test #70:

score: 0
Accepted
time: 16ms
memory: 66600kb

input:

1212 1661

output:

994765958

result:

ok 1 number(s): "994765958"

Test #71:

score: 0
Accepted
time: 8ms
memory: 66708kb

input:

371 392

output:

219234267

result:

ok 1 number(s): "219234267"

Test #72:

score: 0
Accepted
time: 8ms
memory: 66808kb

input:

9 1880

output:

8060278

result:

ok 1 number(s): "8060278"

Test #73:

score: 0
Accepted
time: 16ms
memory: 67084kb

input:

1261 1661

output:

758936320

result:

ok 1 number(s): "758936320"

Test #74:

score: 0
Accepted
time: 16ms
memory: 67160kb

input:

1230 1181

output:

779408070

result:

ok 1 number(s): "779408070"

Test #75:

score: 0
Accepted
time: 13ms
memory: 65988kb

input:

1021 1725

output:

113525552

result:

ok 1 number(s): "113525552"

Test #76:

score: 0
Accepted
time: 8ms
memory: 67368kb

input:

93 578

output:

697429656

result:

ok 1 number(s): "697429656"

Test #77:

score: 0
Accepted
time: 8ms
memory: 67112kb

input:

178 1838

output:

614194584

result:

ok 1 number(s): "614194584"

Test #78:

score: 0
Accepted
time: 4ms
memory: 67048kb

input:

244 1924

output:

494208055

result:

ok 1 number(s): "494208055"

Test #79:

score: 0
Accepted
time: 3ms
memory: 67076kb

input:

512 694

output:

548135015

result:

ok 1 number(s): "548135015"

Test #80:

score: 0
Accepted
time: 8ms
memory: 67084kb

input:

279 1364

output:

321911652

result:

ok 1 number(s): "321911652"

Test #81:

score: 0
Accepted
time: 8ms
memory: 66640kb

input:

180 1936

output:

896463666

result:

ok 1 number(s): "896463666"

Test #82:

score: 0
Accepted
time: 13ms
memory: 65984kb

input:

1114 1414

output:

661270044

result:

ok 1 number(s): "661270044"

Test #83:

score: 0
Accepted
time: 11ms
memory: 66580kb

input:

1354 689

output:

516159868

result:

ok 1 number(s): "516159868"

Test #84:

score: 0
Accepted
time: 8ms
memory: 66668kb

input:

1741 360

output:

744879363

result:

ok 1 number(s): "744879363"

Test #85:

score: 0
Accepted
time: 9ms
memory: 66704kb

input:

612 1668

output:

833269962

result:

ok 1 number(s): "833269962"

Test #86:

score: 0
Accepted
time: 3ms
memory: 66540kb

input:

989 726

output:

705046442

result:

ok 1 number(s): "705046442"

Test #87:

score: 0
Accepted
time: 8ms
memory: 66980kb

input:

679 223

output:

305257943

result:

ok 1 number(s): "305257943"

Test #88:

score: 0
Accepted
time: 12ms
memory: 66744kb

input:

817 959

output:

30744988

result:

ok 1 number(s): "30744988"

Test #89:

score: 0
Accepted
time: 12ms
memory: 67212kb

input:

1911 923

output:

961846964

result:

ok 1 number(s): "961846964"

Test #90:

score: 0
Accepted
time: 0ms
memory: 67380kb

input:

303 1581

output:

200985047

result:

ok 1 number(s): "200985047"

Test #91:

score: 0
Accepted
time: 7ms
memory: 66780kb

input:

1700 1128

output:

26972923

result:

ok 1 number(s): "26972923"

Test #92:

score: 0
Accepted
time: 8ms
memory: 66876kb

input:

195 353

output:

362739271

result:

ok 1 number(s): "362739271"

Test #93:

score: 0
Accepted
time: 21ms
memory: 66620kb

input:

1769 1571

output:

543041274

result:

ok 1 number(s): "543041274"

Test #94:

score: 0
Accepted
time: 6ms
memory: 66016kb

input:

926 268

output:

690734700

result:

ok 1 number(s): "690734700"

Test #95:

score: 0
Accepted
time: 6ms
memory: 66308kb

input:

284 926

output:

113072753

result:

ok 1 number(s): "113072753"

Test #96:

score: 0
Accepted
time: 4ms
memory: 66424kb

input:

79 539

output:

38185356

result:

ok 1 number(s): "38185356"

Test #97:

score: 0
Accepted
time: 3ms
memory: 66944kb

input:

534 1976

output:

626056470

result:

ok 1 number(s): "626056470"

Test #98:

score: 0
Accepted
time: 8ms
memory: 66240kb

input:

1605 19

output:

481987442

result:

ok 1 number(s): "481987442"

Test #99:

score: 0
Accepted
time: 8ms
memory: 67088kb

input:

350 1756

output:

372219831

result:

ok 1 number(s): "372219831"

Test #100:

score: 0
Accepted
time: 20ms
memory: 66488kb

input:

1421 1858

output:

114050192

result:

ok 1 number(s): "114050192"

Test #101:

score: 0
Accepted
time: 8ms
memory: 66092kb

input:

15 738

output:

547798968

result:

ok 1 number(s): "547798968"

Test #102:

score: 0
Accepted
time: 8ms
memory: 66620kb

input:

74 1576

output:

650893262

result:

ok 1 number(s): "650893262"

Test #103:

score: 0
Accepted
time: 12ms
memory: 66396kb

input:

805 1237

output:

488424960

result:

ok 1 number(s): "488424960"

Test #104:

score: 0
Accepted
time: 23ms
memory: 66156kb

input:

1641 1859

output:

326160206

result:

ok 1 number(s): "326160206"

Test #105:

score: 0
Accepted
time: 4ms
memory: 67444kb

input:

565 1176

output:

992433521

result:

ok 1 number(s): "992433521"

Test #106:

score: 0
Accepted
time: 11ms
memory: 66056kb

input:

1132 776

output:

77729009

result:

ok 1 number(s): "77729009"

Test #107:

score: 0
Accepted
time: 6ms
memory: 66400kb

input:

1635 265

output:

811430683

result:

ok 1 number(s): "811430683"

Test #108:

score: 0
Accepted
time: 16ms
memory: 67308kb

input:

1798 1517

output:

241202752

result:

ok 1 number(s): "241202752"

Test #109:

score: 0
Accepted
time: 6ms
memory: 66972kb

input:

308 1568

output:

372880942

result:

ok 1 number(s): "372880942"

Test #110:

score: 0
Accepted
time: 8ms
memory: 67088kb

input:

1667 514

output:

370300243

result:

ok 1 number(s): "370300243"

Test #111:

score: 0
Accepted
time: 11ms
memory: 67424kb

input:

809 678

output:

473441275

result:

ok 1 number(s): "473441275"

Test #112:

score: 0
Accepted
time: 9ms
memory: 67292kb

input:

1079 647

output:

546813300

result:

ok 1 number(s): "546813300"

Test #113:

score: 0
Accepted
time: 7ms
memory: 66164kb

input:

1300 567

output:

61615334

result:

ok 1 number(s): "61615334"

Test #114:

score: 0
Accepted
time: 14ms
memory: 66220kb

input:

1353 1626

output:

658267810

result:

ok 1 number(s): "658267810"

Test #115:

score: 0
Accepted
time: 13ms
memory: 66528kb

input:

1316 1074

output:

360327619

result:

ok 1 number(s): "360327619"

Test #116:

score: 0
Accepted
time: 14ms
memory: 66496kb

input:

1013 1301

output:

809422322

result:

ok 1 number(s): "809422322"

Test #117:

score: 0
Accepted
time: 0ms
memory: 66880kb

input:

181 1025

output:

579886432

result:

ok 1 number(s): "579886432"

Test #118:

score: 0
Accepted
time: 18ms
memory: 66456kb

input:

1282 1919

output:

521646465

result:

ok 1 number(s): "521646465"

Test #119:

score: 0
Accepted
time: 8ms
memory: 66544kb

input:

1803 227

output:

550862539

result:

ok 1 number(s): "550862539"

Test #120:

score: 0
Accepted
time: 25ms
memory: 66252kb

input:

1994 1778

output:

341735070

result:

ok 1 number(s): "341735070"

Test #121:

score: 0
Accepted
time: 19ms
memory: 66244kb

input:

1975 1629

output:

747373729

result:

ok 1 number(s): "747373729"

Test #122:

score: 0
Accepted
time: 10ms
memory: 65992kb

input:

461 1246

output:

537077537

result:

ok 1 number(s): "537077537"

Test #123:

score: 0
Accepted
time: 8ms
memory: 66772kb

input:

1153 331

output:

509185452

result:

ok 1 number(s): "509185452"

Test #124:

score: 0
Accepted
time: 16ms
memory: 66136kb

input:

1473 1245

output:

277101123

result:

ok 1 number(s): "277101123"

Test #125:

score: 0
Accepted
time: 16ms
memory: 66268kb

input:

1693 1246

output:

896642815

result:

ok 1 number(s): "896642815"

Test #126:

score: 0
Accepted
time: 16ms
memory: 66040kb

input:

1228 1364

output:

786336622

result:

ok 1 number(s): "786336622"

Test #127:

score: 0
Accepted
time: 17ms
memory: 66632kb

input:

1385 1513

output:

752734438

result:

ok 1 number(s): "752734438"

Test #128:

score: 0
Accepted
time: 4ms
memory: 66564kb

input:

1441 861

output:

112908239

result:

ok 1 number(s): "112908239"

Test #129:

score: 0
Accepted
time: 18ms
memory: 66860kb

input:

1874 1355

output:

796162910

result:

ok 1 number(s): "796162910"

Test #130:

score: 0
Accepted
time: 12ms
memory: 66640kb

input:

888 1293

output:

764908105

result:

ok 1 number(s): "764908105"

Test #131:

score: 0
Accepted
time: 8ms
memory: 66816kb

input:

387 1645

output:

141108882

result:

ok 1 number(s): "141108882"

Test #132:

score: 0
Accepted
time: 16ms
memory: 66048kb

input:

1214 1651

output:

454918212

result:

ok 1 number(s): "454918212"

Test #133:

score: 0
Accepted
time: 15ms
memory: 66032kb

input:

1575 1193

output:

257571579

result:

ok 1 number(s): "257571579"

Test #134:

score: 0
Accepted
time: 7ms
memory: 66516kb

input:

1979 957

output:

776839960

result:

ok 1 number(s): "776839960"

Test #135:

score: 0
Accepted
time: 8ms
memory: 66180kb

input:

179 806

output:

434015136

result:

ok 1 number(s): "434015136"

Test #136:

score: 0
Accepted
time: 6ms
memory: 65968kb

input:

115 62

output:

117872752

result:

ok 1 number(s): "117872752"

Test #137:

score: 0
Accepted
time: 3ms
memory: 66448kb

input:

514 1630

output:

510571394

result:

ok 1 number(s): "510571394"

Test #138:

score: 0
Accepted
time: 3ms
memory: 67128kb

input:

571 1365

output:

947355968

result:

ok 1 number(s): "947355968"

Test #139:

score: 0
Accepted
time: 12ms
memory: 66176kb

input:

1035 1007

output:

969541762

result:

ok 1 number(s): "969541762"

Test #140:

score: 0
Accepted
time: 11ms
memory: 66096kb

input:

2000 1168

output:

907429691

result:

ok 1 number(s): "907429691"

Test #141:

score: 0
Accepted
time: 11ms
memory: 66888kb

input:

2000 1020

output:

122866734

result:

ok 1 number(s): "122866734"

Test #142:

score: 0
Accepted
time: 27ms
memory: 66452kb

input:

2000 1850

output:

335024835

result:

ok 1 number(s): "335024835"

Test #143:

score: 0
Accepted
time: 7ms
memory: 66936kb

input:

2000 613

output:

760077443

result:

ok 1 number(s): "760077443"

Test #144:

score: 0
Accepted
time: 12ms
memory: 66904kb

input:

2000 1173

output:

211765972

result:

ok 1 number(s): "211765972"

Test #145:

score: 0
Accepted
time: 0ms
memory: 66248kb

input:

2000 80

output:

394253700

result:

ok 1 number(s): "394253700"

Test #146:

score: 0
Accepted
time: 22ms
memory: 67264kb

input:

2000 1970

output:

351051757

result:

ok 1 number(s): "351051757"

Test #147:

score: 0
Accepted
time: 8ms
memory: 67096kb

input:

2000 319

output:

825558993

result:

ok 1 number(s): "825558993"

Test #148:

score: 0
Accepted
time: 17ms
memory: 66152kb

input:

2000 1397

output:

840996733

result:

ok 1 number(s): "840996733"

Test #149:

score: 0
Accepted
time: 0ms
memory: 66708kb

input:

2000 269

output:

181360320

result:

ok 1 number(s): "181360320"

Test #150:

score: 0
Accepted
time: 15ms
memory: 67260kb

input:

2000 1416

output:

836259898

result:

ok 1 number(s): "836259898"

Test #151:

score: 0
Accepted
time: 8ms
memory: 66184kb

input:

2000 504

output:

900434668

result:

ok 1 number(s): "900434668"

Test #152:

score: 0
Accepted
time: 7ms
memory: 66904kb

input:

2000 957

output:

951127052

result:

ok 1 number(s): "951127052"

Test #153:

score: 0
Accepted
time: 18ms
memory: 67144kb

input:

2000 1522

output:

979736312

result:

ok 1 number(s): "979736312"

Test #154:

score: 0
Accepted
time: 20ms
memory: 67060kb

input:

2000 1550

output:

117311030

result:

ok 1 number(s): "117311030"

Test #155:

score: 0
Accepted
time: 29ms
memory: 66632kb

input:

2000 2000

output:

91083817

result:

ok 1 number(s): "91083817"