QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#46854#4667. Eggs RepaintingQingyuAC ✓34ms19436kbC++23602b2022-09-02 00:51:032022-09-02 00:51:04

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-02 00:51:04]
  • 评测
  • 测评结果:AC
  • 用时:34ms
  • 内存:19436kb
  • [2022-09-02 00:51:03]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n, k;
int dp[2010][2010];
int main() {
	scanf("%d%d", &n, &k);
	dp[0][1] = n;
	for (int i = 0; i < k; i++) {
		for (int j = 0; j <= n; j++) {
			dp[i + 1][j] = (dp[i + 1][j] + (j + 1ll * (n - j) * (n - 1)) % mod * dp[i][j]) % mod; 
			if (j) dp[i + 1][j - 1] = (dp[i + 1][j - 1] + (1ll * j * (n - 1)) % mod * dp[i][j]) % mod; 
			dp[i + 1][j + 1] = (dp[i + 1][j + 1] + 1ll * (n - j) * dp[i][j]) % mod; 
		}
	}
	int sum = 0;
	for (int i = 1; i <= n; i++) sum = (sum + dp[k][i]) % mod;
	cout << sum << endl;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3752kb

input:

4 3

output:

11656

result:

ok 1 number(s): "11656"

Test #2:

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

input:

1875 1065

output:

604459648

result:

ok 1 number(s): "604459648"

Test #3:

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

input:

1281 1366

output:

794264570

result:

ok 1 number(s): "794264570"

Test #4:

score: 0
Accepted
time: 2ms
memory: 6012kb

input:

326 444

output:

585764150

result:

ok 1 number(s): "585764150"

Test #5:

score: 0
Accepted
time: 1ms
memory: 4780kb

input:

1342 124

output:

319299580

result:

ok 1 number(s): "319299580"

Test #6:

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

input:

386 1016

output:

368940820

result:

ok 1 number(s): "368940820"

Test #7:

score: 0
Accepted
time: 2ms
memory: 5392kb

input:

1078 236

output:

966299801

result:

ok 1 number(s): "966299801"

Test #8:

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

input:

286 114

output:

110001723

result:

ok 1 number(s): "110001723"

Test #9:

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

input:

1024 1434

output:

77018908

result:

ok 1 number(s): "77018908"

Test #10:

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

input:

1328 1285

output:

921021531

result:

ok 1 number(s): "921021531"

Test #11:

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

input:

1984 201

output:

820381269

result:

ok 1 number(s): "820381269"

Test #12:

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

input:

834 1083

output:

958107563

result:

ok 1 number(s): "958107563"

Test #13:

score: 0
Accepted
time: 5ms
memory: 5968kb

input:

444 378

output:

233676262

result:

ok 1 number(s): "233676262"

Test #14:

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

input:

439 1347

output:

434448580

result:

ok 1 number(s): "434448580"

Test #15:

score: 0
Accepted
time: 2ms
memory: 6808kb

input:

1491 400

output:

449765212

result:

ok 1 number(s): "449765212"

Test #16:

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

input:

1300 116

output:

382127985

result:

ok 1 number(s): "382127985"

Test #17:

score: 0
Accepted
time: 2ms
memory: 12544kb

input:

604 1374

output:

78845338

result:

ok 1 number(s): "78845338"

Test #18:

score: 0
Accepted
time: 2ms
memory: 5688kb

input:

512 335

output:

363193596

result:

ok 1 number(s): "363193596"

Test #19:

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

input:

1156 811

output:

256156969

result:

ok 1 number(s): "256156969"

Test #20:

score: 0
Accepted
time: 2ms
memory: 5700kb

input:

330 385

output:

176387814

result:

ok 1 number(s): "176387814"

Test #21:

score: 0
Accepted
time: 1ms
memory: 7960kb

input:

885 577

output:

346349124

result:

ok 1 number(s): "346349124"

Test #22:

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

input:

310 1593

output:

108014116

result:

ok 1 number(s): "108014116"

Test #23:

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

input:

388 1736

output:

513947142

result:

ok 1 number(s): "513947142"

Test #24:

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

input:

280 1579

output:

452330855

result:

ok 1 number(s): "452330855"

Test #25:

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

input:

1672 1433

output:

938637774

result:

ok 1 number(s): "938637774"

Test #26:

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

input:

1058 1561

output:

723799897

result:

ok 1 number(s): "723799897"

Test #27:

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

input:

1392 852

output:

670351856

result:

ok 1 number(s): "670351856"

Test #28:

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

input:

1814 1183

output:

225014104

result:

ok 1 number(s): "225014104"

Test #29:

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

input:

1898 1545

output:

122425281

result:

ok 1 number(s): "122425281"

Test #30:

score: 0
Accepted
time: 2ms
memory: 11012kb

input:

38 1735

output:

804496205

result:

ok 1 number(s): "804496205"

Test #31:

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

input:

1878 1060

output:

162343638

result:

ok 1 number(s): "162343638"

Test #32:

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

input:

353 1895

output:

148504395

result:

ok 1 number(s): "148504395"

Test #33:

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

input:

12 275

output:

876959212

result:

ok 1 number(s): "876959212"

Test #34:

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

input:

1954 1810

output:

755282661

result:

ok 1 number(s): "755282661"

Test #35:

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

input:

1539 996

output:

414637712

result:

ok 1 number(s): "414637712"

Test #36:

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

input:

1603 645

output:

830337356

result:

ok 1 number(s): "830337356"

Test #37:

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

input:

1784 824

output:

425203679

result:

ok 1 number(s): "425203679"

Test #38:

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

input:

485 1833

output:

467648525

result:

ok 1 number(s): "467648525"

Test #39:

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

input:

551 1081

output:

738566136

result:

ok 1 number(s): "738566136"

Test #40:

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

input:

601 158

output:

812005202

result:

ok 1 number(s): "812005202"

Test #41:

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

input:

402 268

output:

604256490

result:

ok 1 number(s): "604256490"

Test #42:

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

input:

1109 1306

output:

169649722

result:

ok 1 number(s): "169649722"

Test #43:

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

input:

1127 1680

output:

584588605

result:

ok 1 number(s): "584588605"

Test #44:

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

input:

425 83

output:

336612167

result:

ok 1 number(s): "336612167"

Test #45:

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

input:

1356 1726

output:

759078268

result:

ok 1 number(s): "759078268"

Test #46:

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

input:

1429 292

output:

368151012

result:

ok 1 number(s): "368151012"

Test #47:

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

input:

1010 802

output:

730158892

result:

ok 1 number(s): "730158892"

Test #48:

score: 0
Accepted
time: 2ms
memory: 9460kb

input:

1375 739

output:

589268934

result:

ok 1 number(s): "589268934"

Test #49:

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

input:

1593 788

output:

442887710

result:

ok 1 number(s): "442887710"

Test #50:

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

input:

1396 1731

output:

623014512

result:

ok 1 number(s): "623014512"

Test #51:

score: 0
Accepted
time: 5ms
memory: 8152kb

input:

1278 568

output:

241372627

result:

ok 1 number(s): "241372627"

Test #52:

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

input:

68 136

output:

396006676

result:

ok 1 number(s): "396006676"

Test #53:

score: 0
Accepted
time: 5ms
memory: 10828kb

input:

1369 903

output:

482948904

result:

ok 1 number(s): "482948904"

Test #54:

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

input:

1698 247

output:

399635018

result:

ok 1 number(s): "399635018"

Test #55:

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

input:

1313 1071

output:

323623357

result:

ok 1 number(s): "323623357"

Test #56:

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

input:

584 379

output:

608714564

result:

ok 1 number(s): "608714564"

Test #57:

score: 0
Accepted
time: 5ms
memory: 12836kb

input:

1618 1149

output:

921329648

result:

ok 1 number(s): "921329648"

Test #58:

score: 0
Accepted
time: 2ms
memory: 10728kb

input:

83 1625

output:

325838908

result:

ok 1 number(s): "325838908"

Test #59:

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

input:

1037 1584

output:

264115938

result:

ok 1 number(s): "264115938"

Test #60:

score: 0
Accepted
time: 5ms
memory: 5208kb

input:

1528 184

output:

768375389

result:

ok 1 number(s): "768375389"

Test #61:

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

input:

1724 1965

output:

784524587

result:

ok 1 number(s): "784524587"

Test #62:

score: 0
Accepted
time: 2ms
memory: 5224kb

input:

666 217

output:

572190290

result:

ok 1 number(s): "572190290"

Test #63:

score: 0
Accepted
time: 5ms
memory: 6756kb

input:

158 663

output:

1941956

result:

ok 1 number(s): "1941956"

Test #64:

score: 0
Accepted
time: 2ms
memory: 5524kb

input:

758 269

output:

549172133

result:

ok 1 number(s): "549172133"

Test #65:

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

input:

1513 1997

output:

152193228

result:

ok 1 number(s): "152193228"

Test #66:

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

input:

1874 1481

output:

681894916

result:

ok 1 number(s): "681894916"

Test #67:

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

input:

853 526

output:

503427023

result:

ok 1 number(s): "503427023"

Test #68:

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

input:

629 514

output:

952044283

result:

ok 1 number(s): "952044283"

Test #69:

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

input:

907 1562

output:

173342153

result:

ok 1 number(s): "173342153"

Test #70:

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

input:

1212 1661

output:

994765958

result:

ok 1 number(s): "994765958"

Test #71:

score: 0
Accepted
time: 1ms
memory: 5808kb

input:

371 392

output:

219234267

result:

ok 1 number(s): "219234267"

Test #72:

score: 0
Accepted
time: 2ms
memory: 11344kb

input:

9 1880

output:

8060278

result:

ok 1 number(s): "8060278"

Test #73:

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

input:

1261 1661

output:

758936320

result:

ok 1 number(s): "758936320"

Test #74:

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

input:

1230 1181

output:

779408070

result:

ok 1 number(s): "779408070"

Test #75:

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

input:

1021 1725

output:

113525552

result:

ok 1 number(s): "113525552"

Test #76:

score: 0
Accepted
time: 5ms
memory: 6180kb

input:

93 578

output:

697429656

result:

ok 1 number(s): "697429656"

Test #77:

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

input:

178 1838

output:

614194584

result:

ok 1 number(s): "614194584"

Test #78:

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

input:

244 1924

output:

494208055

result:

ok 1 number(s): "494208055"

Test #79:

score: 0
Accepted
time: 2ms
memory: 7900kb

input:

512 694

output:

548135015

result:

ok 1 number(s): "548135015"

Test #80:

score: 0
Accepted
time: 2ms
memory: 10776kb

input:

279 1364

output:

321911652

result:

ok 1 number(s): "321911652"

Test #81:

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

input:

180 1936

output:

896463666

result:

ok 1 number(s): "896463666"

Test #82:

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

input:

1114 1414

output:

661270044

result:

ok 1 number(s): "661270044"

Test #83:

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

input:

1354 689

output:

516159868

result:

ok 1 number(s): "516159868"

Test #84:

score: 0
Accepted
time: 5ms
memory: 6432kb

input:

1741 360

output:

744879363

result:

ok 1 number(s): "744879363"

Test #85:

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

input:

612 1668

output:

833269962

result:

ok 1 number(s): "833269962"

Test #86:

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

input:

989 726

output:

705046442

result:

ok 1 number(s): "705046442"

Test #87:

score: 0
Accepted
time: 5ms
memory: 5296kb

input:

679 223

output:

305257943

result:

ok 1 number(s): "305257943"

Test #88:

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

input:

817 959

output:

30744988

result:

ok 1 number(s): "30744988"

Test #89:

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

input:

1911 923

output:

961846964

result:

ok 1 number(s): "961846964"

Test #90:

score: 0
Accepted
time: 5ms
memory: 11948kb

input:

303 1581

output:

200985047

result:

ok 1 number(s): "200985047"

Test #91:

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

input:

1700 1128

output:

26972923

result:

ok 1 number(s): "26972923"

Test #92:

score: 0
Accepted
time: 2ms
memory: 5456kb

input:

195 353

output:

362739271

result:

ok 1 number(s): "362739271"

Test #93:

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

input:

1769 1571

output:

543041274

result:

ok 1 number(s): "543041274"

Test #94:

score: 0
Accepted
time: 1ms
memory: 5696kb

input:

926 268

output:

690734700

result:

ok 1 number(s): "690734700"

Test #95:

score: 0
Accepted
time: 2ms
memory: 8296kb

input:

284 926

output:

113072753

result:

ok 1 number(s): "113072753"

Test #96:

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

input:

79 539

output:

38185356

result:

ok 1 number(s): "38185356"

Test #97:

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

input:

534 1976

output:

626056470

result:

ok 1 number(s): "626056470"

Test #98:

score: 0
Accepted
time: 2ms
memory: 3880kb

input:

1605 19

output:

481987442

result:

ok 1 number(s): "481987442"

Test #99:

score: 0
Accepted
time: 2ms
memory: 13232kb

input:

350 1756

output:

372219831

result:

ok 1 number(s): "372219831"

Test #100:

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

input:

1421 1858

output:

114050192

result:

ok 1 number(s): "114050192"

Test #101:

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

input:

15 738

output:

547798968

result:

ok 1 number(s): "547798968"

Test #102:

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

input:

74 1576

output:

650893262

result:

ok 1 number(s): "650893262"

Test #103:

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

input:

805 1237

output:

488424960

result:

ok 1 number(s): "488424960"

Test #104:

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

input:

1641 1859

output:

326160206

result:

ok 1 number(s): "326160206"

Test #105:

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

input:

565 1176

output:

992433521

result:

ok 1 number(s): "992433521"

Test #106:

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

input:

1132 776

output:

77729009

result:

ok 1 number(s): "77729009"

Test #107:

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

input:

1635 265

output:

811430683

result:

ok 1 number(s): "811430683"

Test #108:

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

input:

1798 1517

output:

241202752

result:

ok 1 number(s): "241202752"

Test #109:

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

input:

308 1568

output:

372880942

result:

ok 1 number(s): "372880942"

Test #110:

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

input:

1667 514

output:

370300243

result:

ok 1 number(s): "370300243"

Test #111:

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

input:

809 678

output:

473441275

result:

ok 1 number(s): "473441275"

Test #112:

score: 0
Accepted
time: 5ms
memory: 8684kb

input:

1079 647

output:

546813300

result:

ok 1 number(s): "546813300"

Test #113:

score: 0
Accepted
time: 2ms
memory: 8184kb

input:

1300 567

output:

61615334

result:

ok 1 number(s): "61615334"

Test #114:

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

input:

1353 1626

output:

658267810

result:

ok 1 number(s): "658267810"

Test #115:

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

input:

1316 1074

output:

360327619

result:

ok 1 number(s): "360327619"

Test #116:

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

input:

1013 1301

output:

809422322

result:

ok 1 number(s): "809422322"

Test #117:

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

input:

181 1025

output:

579886432

result:

ok 1 number(s): "579886432"

Test #118:

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

input:

1282 1919

output:

521646465

result:

ok 1 number(s): "521646465"

Test #119:

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

input:

1803 227

output:

550862539

result:

ok 1 number(s): "550862539"

Test #120:

score: 0
Accepted
time: 30ms
memory: 17724kb

input:

1994 1778

output:

341735070

result:

ok 1 number(s): "341735070"

Test #121:

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

input:

1975 1629

output:

747373729

result:

ok 1 number(s): "747373729"

Test #122:

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

input:

461 1246

output:

537077537

result:

ok 1 number(s): "537077537"

Test #123:

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

input:

1153 331

output:

509185452

result:

ok 1 number(s): "509185452"

Test #124:

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

input:

1473 1245

output:

277101123

result:

ok 1 number(s): "277101123"

Test #125:

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

input:

1693 1246

output:

896642815

result:

ok 1 number(s): "896642815"

Test #126:

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

input:

1228 1364

output:

786336622

result:

ok 1 number(s): "786336622"

Test #127:

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

input:

1385 1513

output:

752734438

result:

ok 1 number(s): "752734438"

Test #128:

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

input:

1441 861

output:

112908239

result:

ok 1 number(s): "112908239"

Test #129:

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

input:

1874 1355

output:

796162910

result:

ok 1 number(s): "796162910"

Test #130:

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

input:

888 1293

output:

764908105

result:

ok 1 number(s): "764908105"

Test #131:

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

input:

387 1645

output:

141108882

result:

ok 1 number(s): "141108882"

Test #132:

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

input:

1214 1651

output:

454918212

result:

ok 1 number(s): "454918212"

Test #133:

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

input:

1575 1193

output:

257571579

result:

ok 1 number(s): "257571579"

Test #134:

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

input:

1979 957

output:

776839960

result:

ok 1 number(s): "776839960"

Test #135:

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

input:

179 806

output:

434015136

result:

ok 1 number(s): "434015136"

Test #136:

score: 0
Accepted
time: 2ms
memory: 3972kb

input:

115 62

output:

117872752

result:

ok 1 number(s): "117872752"

Test #137:

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

input:

514 1630

output:

510571394

result:

ok 1 number(s): "510571394"

Test #138:

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

input:

571 1365

output:

947355968

result:

ok 1 number(s): "947355968"

Test #139:

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

input:

1035 1007

output:

969541762

result:

ok 1 number(s): "969541762"

Test #140:

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

input:

2000 1168

output:

907429691

result:

ok 1 number(s): "907429691"

Test #141:

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

input:

2000 1020

output:

122866734

result:

ok 1 number(s): "122866734"

Test #142:

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

input:

2000 1850

output:

335024835

result:

ok 1 number(s): "335024835"

Test #143:

score: 0
Accepted
time: 2ms
memory: 8480kb

input:

2000 613

output:

760077443

result:

ok 1 number(s): "760077443"

Test #144:

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

input:

2000 1173

output:

211765972

result:

ok 1 number(s): "211765972"

Test #145:

score: 0
Accepted
time: 1ms
memory: 4440kb

input:

2000 80

output:

394253700

result:

ok 1 number(s): "394253700"

Test #146:

score: 0
Accepted
time: 34ms
memory: 19240kb

input:

2000 1970

output:

351051757

result:

ok 1 number(s): "351051757"

Test #147:

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

input:

2000 319

output:

825558993

result:

ok 1 number(s): "825558993"

Test #148:

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

input:

2000 1397

output:

840996733

result:

ok 1 number(s): "840996733"

Test #149:

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

input:

2000 269

output:

181360320

result:

ok 1 number(s): "181360320"

Test #150:

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

input:

2000 1416

output:

836259898

result:

ok 1 number(s): "836259898"

Test #151:

score: 0
Accepted
time: 5ms
memory: 7744kb

input:

2000 504

output:

900434668

result:

ok 1 number(s): "900434668"

Test #152:

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

input:

2000 957

output:

951127052

result:

ok 1 number(s): "951127052"

Test #153:

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

input:

2000 1522

output:

979736312

result:

ok 1 number(s): "979736312"

Test #154:

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

input:

2000 1550

output:

117311030

result:

ok 1 number(s): "117311030"

Test #155:

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

input:

2000 2000

output:

91083817

result:

ok 1 number(s): "91083817"