Created
December 22, 2016 14:40
-
-
Save petermolnar-dev/92c564c17b90f45cbf2ed503a12a41fa to your computer and use it in GitHub Desktop.
HackerRank - Objective-C read 2 parameters, and then a line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
int n; | |
int k; | |
scanf("%i %i",&n,&k); | |
int a[n]; | |
for(int a_i = 0; a_i < n; a_i++){ | |
scanf("%d",&a[a_i]); | |
} | |
[pool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment