QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#675934#2383. Broken WatchLaVuna47#AC ✓16ms10740kbPython3266b2024-10-25 19:43:192024-10-25 19:43:20

Judging History

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

  • [2024-10-25 19:43:20]
  • 评测
  • 测评结果:AC
  • 用时:16ms
  • 内存:10740kb
  • [2024-10-25 19:43:19]
  • 提交

answer

a,b,c,n = map(int,input().split())
if(n%2 == 1):
	k = n//2
	res = (k * (k+1))//2
	res*=n*2
else:
	k = n//2+1
	res = (k*(k+1))//2-3
	res*=n*2
if(a== b == c):
	cur = 6
elif(a== b or b == c):
	cur = 2
else:
	cur = 1
res//=cur
res%= (2**64)
print(res)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 10ms
memory: 10624kb

input:

1193 2741 3559 2

output:

0

result:

ok single line: '0'

Test #2:

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

input:

1193 2741 3559 17

output:

1224

result:

ok single line: '1224'

Test #3:

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

input:

1193 2741 2741 17

output:

612

result:

ok single line: '612'

Test #4:

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

input:

2741 2741 2741 17

output:

204

result:

ok single line: '204'

Test #5:

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

input:

1193 2741 3559 1193

output:

424483716

result:

ok single line: '424483716'

Test #6:

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

input:

1193 2741 2741 1193

output:

212241858

result:

ok single line: '212241858'

Test #7:

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

input:

2741 2741 2741 1193

output:

70747286

result:

ok single line: '70747286'

Test #8:

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

input:

1193 2741 3559 2000000000

output:

10584946410820579328

result:

ok single line: '10584946410820579328'

Test #9:

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

input:

1193 2741 2741 2000000000

output:

14515845242265065472

result:

ok single line: '14515845242265065472'

Test #10:

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

input:

2741 2741 2741 2000000000

output:

4838615080755021824

result:

ok single line: '4838615080755021824'

Test #11:

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

input:

1193 2741 3559 2000000001

output:

7584946419820579328

result:

ok single line: '7584946419820579328'

Test #12:

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

input:

1193 2741 2741 2

output:

0

result:

ok single line: '0'

Test #13:

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

input:

1193 2741 2741 2000000001

output:

13015845246765065472

result:

ok single line: '13015845246765065472'

Test #14:

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

input:

2741 2741 2741 2000000001

output:

4338615082255021824

result:

ok single line: '4338615082255021824'

Test #15:

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

input:

1193 2741 3559 4000000000

output:

5339339113435979776

result:

ok single line: '5339339113435979776'

Test #16:

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

input:

1193 2741 2741 4000000000

output:

11893041593572765696

result:

ok single line: '11893041593572765696'

Test #17:

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

input:

2741 2741 2741 4000000000

output:

16262176580330622976

result:

ok single line: '16262176580330622976'

Test #18:

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

input:

1193 2741 3559 4000000001

output:

11786083205145531392

result:

ok single line: '11786083205145531392'

Test #19:

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

input:

1193 2741 2741 4000000001

output:

5893041602572765696

result:

ok single line: '5893041602572765696'

Test #20:

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

input:

2741 2741 2741 4000000001

output:

14262176583330622976

result:

ok single line: '14262176583330622976'

Test #21:

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

input:

1193 2741 3559 4294967295

output:

4611686020574871552

result:

ok single line: '4611686020574871552'

Test #22:

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

input:

1193 2741 2741 4294967295

output:

11529215047142211584

result:

ok single line: '11529215047142211584'

Test #23:

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

input:

2741 2741 2741 2

output:

0

result:

ok single line: '0'

Test #24:

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

input:

2741 2741 2741 4294967295

output:

9991986373617254400

result:

ok single line: '9991986373617254400'

Test #25:

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

input:

1193 2741 3559 4294967294

output:

18446744043644780556

result:

ok single line: '18446744043644780556'

Test #26:

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

input:

1193 2741 2741 4294967294

output:

18446744058677166086

result:

ok single line: '18446744058677166086'

Test #27:

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

input:

2741 2741 2741 4294967294

output:

12297829377462239234

result:

ok single line: '12297829377462239234'

Test #28:

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

input:

1193 2741 3559 3

output:

6

result:

ok single line: '6'

Test #29:

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

input:

1193 2741 2741 3

output:

3

result:

ok single line: '3'

Test #30:

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

input:

2741 2741 2741 3

output:

1

result:

ok single line: '1'

Test #31:

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

input:

1193 2741 3559 4

output:

24

result:

ok single line: '24'

Test #32:

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

input:

1193 2741 2741 4

output:

12

result:

ok single line: '12'

Test #33:

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

input:

2741 2741 2741 4

output:

4

result:

ok single line: '4'