flip 32bits and find value
Statement
Goal
You will be given a list of 32 bit unsigned integers. Flip all the bits (1->0 and 0->1) and return the result as an unsigned integer.Input
The first line of the input contains n, the number of queries.
Each of the next n lines contain an integer, q, to process
Each of the next n lines contain an integer, q, to process
Output
int: the unsigned decimal integer result
Constraints
1<=n<=100
0<=q<2**32
0<=q<2**32
Example
Input
3 2147483647 1 0
Output
2147483648 4294967294 4294967295
Game modes
Fastest, Shortest, Reverse
Test cases
Test 1 Test
Input
3
2147483647
1
0
Output
2147483648
4294967294
4294967295
Validator 1 Validator
Input
4
67108864
256
268435456
4096
Output
4227858431
4294967039
4026531839
4294963199
Test 2 Test
Input
1
4294967295
Output
0
Validator 2 Validator
Input
14
4
16384
16
262144
268435456
1024
1048576
16
16777216
2147483648
1
4194304
16384
128
Output
4294967291
4294950911
4294967279
4294705151
4026531839
4294966271
4293918719
4294967279
4278190079
2147483647
4294967294
4290772991
4294950911
4294967167
Test 3 Test
Input
18
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
Output
4294967294
4294967293
4294967291
4294967287
4294967279
4294967263
4294967231
4294967167
4294967039
4294966783
4294966271
4294965247
4294963199
4294959103
4294950911
4294934527
4294901759
4294836223
Validator 3 Validator
Input
35
2672014991
1499569351
1311372904
2303009914
2960334500
2927976771
3629382734
464186945
612404077
3668887895
2085824650
4237702854
2802238250
2191461270
2304633523
2027954928
2014324209
524717694
2199485252
4237816651
1147350137
2115872316
4017650171
3579839067
2199661792
4275082781
1219763017
2337092616
2218314924
4050022241
3819953284
4257660940
4226888946
3538874864
1149715520
Output
1622952304
2795397944
2983594391
1991957381
1334632795
1366990524
665584561
3830780350
3682563218
626079400
2209142645
57264441
1492729045
2103506025
1990333772
2267012367
2280643086
3770249601
2095482043
57150644
3147617158
2179094979
277317124
715128228
2095305503
19884514
3075204278
1957874679
2076652371
244945054
475014011
37306355
68078349
756092431
3145251775
Test 4 Test
Input
56
606478781
2105669450
924295380
995178010
277153377
34375824
2927870501
1445985000
2854010163
3305365756
2375998506
3314310356
3020798411
3797805782
2460288254
1602237073
534334100
1995672681
1693893777
3048907899
4131311808
2310728276
2775392096
2551941789
4046293161
2555788208
825796602
2416385992
563676906
600249847
174732229
3862431421
2365488305
1649245855
405992066
1214911370
1378334620
3587358321
2746616501
1301969295
577065877
3656202637
1828274719
405330696
2242752129
3971167577
2752333562
2266390825
3077746458
4071660853
1024767124
1282789927
4152112600
1235294282
1158264327
701369933
Output
3688488514
2189297845
3370671915
3299789285
4017813918
4260591471
1367096794
2848982295
1440957132
989601539
1918968789
980656939
1274168884
497161513
1834679041
2692730222
3760633195
2299294614
2601073518
1246059396
163655487
1984239019
1519575199
1743025506
248674134
1739179087
3469170693
1878581303
3731290389
3694717448
4120235066
432535874
1929478990
2645721440
3888975229
3080055925
2916632675
707608974
1548350794
2992998000
3717901418
638764658
2466692576
3889636599
2052215166
323799718
1542633733
2028576470
1217220837
223306442
3270200171
3012177368
142854695
3059673013
3136702968
3593597362
Validator 4 Validator
Input
78
2336023684
4006193934
2748874840
1049504966
1192788918
2040744975
4199707369
2070761928
3668409347
2213045839
3466995025
1567008381
4086819438
2542364701
1909569299
2989134323
2506380404
1409960445
1247839144
1395759587
324907407
2986007316
2335422103
3817361401
415201592
3245241804
1265959388
2012388425
824838269
329076540
4073916403
168478481
2134478636
3071314071
4285969874
3144668694
312970377
362593722
3092244913
729066278
787081533
775298037
1747352292
575735130
4277748138
683769251
1097956995
3614934836
2929263545
3669905204
129144614
3466209897
1452184250
1731180101
4187622159
3304648491
3012289685
921829878
3917491547
2652874811
2671148704
1141802274
3757155441
2739398888
2154801500
1766440263
4121065028
4039104357
819559923
2726670081
3282914433
1080325542
489028180
1556957968
3210039701
3677901167
4062770831
3252576568
Output
1958943611
288773361
1546092455
3245462329
3102178377
2254222320
95259926
2224205367
626557948
2081921456
827972270
2727958914
208147857
1752602594
2385397996
1305832972
1788586891
2885006850
3047128151
2899207708
3970059888
1308959979
1959545192
477605894
3879765703
1049725491
3029007907
2282578870
3470129026
3965890755
221050892
4126488814
2160488659
1223653224
8997421
1150298601
3981996918
3932373573
1202722382
3565901017
3507885762
3519669258
2547615003
3719232165
17219157
3611198044
3197010300
680032459
1365703750
625062091
4165822681
828757398
2842783045
2563787194
107345136
990318804
1282677610
3373137417
377475748
1642092484
1623818591
3153165021
537811854
1555568407
2140165795
2528527032
173902267
255862938
3475407372
1568297214
1012052862
3214641753
3805939115
2738009327
1084927594
617066128
232196464
1042390727
Solution language
Solution
Stub generator input