111402024-07-07 15:59:44probaKártya (80 pont)python3Accepted 80/8029ms3300 KiB
#N = 352
N = int(input())
#6
# '2 7 6 3 4 2'
#lap = [int(i) for i in '116 619 388 603 447 136 738 461 267 121 881 652 334 723 259 977 253 256 977 164 147 60 445 521 536 311 169 568 303 118 578 835 678 593 158 454 104 353 54 828 325 314 56 893 271 794 9 646 269 145 3 474 220 352 936 825 727 138 790 215 772 813 987 21 817 487 548 837 153 996 913 445 342 699 164 935 859 158 38 831 705 9 449 832 954 210 900 192 497 516 395 647 27 881 673 993 763 326 632 262 862 487 802 715 348 127 140 897 69 819 888 124 906 40 252 385 151 759 68 403 938 261 971 952 273 210 924 513 336 111 582 16 986 329 589 773 25 305 632 172 809 103 731 970 343 899 652 246 508 553 160 284 755 919 568 803 745 650 829 670 734 412 616 746 968 928 404 468 694 35 892 397 482 787 64 892 978 334 37 775 415 451 584 563 242 390 834 540 813 514 880 710 816 106 535 713 444 720 249 454 988 352 539 773 161 468 961 154 817 752 796 581 198 194 339 341 86 734 784 764 157 437 29 70 37 392 583 392 217 449 647 908 322 661 27 385 938 672 651 632 219 979 487 338 157 120 648 269 802 214 3 554 887 491 237 5 520 932 868 554 148 957 465 321 228 722 806 93 946 436 566 331 385 950 592 963 845 855 999 55 893 832 208 921 836 435 734 528 59 77 678 440 684 606 569 880 87 562 59 810 663 56 430 845 27 473 126 106 95 240 906 243 881 836 47 970 36 141 522 496 561 115 176 852 661 624 235 934 184 193 56 154 126 724 792 989 156 422 713 330 905 592 685 286 302 828 270 788 409 693 786 780'.split(' ')]

lap = [int(i) for i in input().split(' ')]
verdict = ( sum(lap)/N==sum(lap)//N )*'IGEN'+( sum(lap)/N!=sum(lap)//N )*'NEM'
print(verdict)
if verdict == 'IGEN':
    ajandek = []
    for i in lap:
        if i>sum(lap)/N:
            ajandek += [int(i-sum(lap)/N)]
        else:
            ajandek += [0]

    print(' '.join([str(i) for i in ajandek]))
else:
    print(((sum(lap)//N)+1)*N-sum(lap))
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/018ms3084 KiB
2Accepted0/018ms3044 KiB
3Accepted4/418ms3044 KiB
4Accepted5/517ms3044 KiB
5Accepted5/518ms3100 KiB
6Accepted5/517ms2996 KiB
7Accepted5/518ms3048 KiB
8Accepted4/417ms3100 KiB
9Accepted4/418ms3064 KiB
10Accepted5/517ms3044 KiB
11Accepted5/518ms2972 KiB
12Accepted5/517ms3044 KiB
13Accepted6/629ms3172 KiB
14Accepted6/618ms3300 KiB
15Accepted7/729ms3116 KiB
16Accepted7/717ms3076 KiB
17Accepted7/729ms3172 KiB