Submission #3232715


Source Code Expand

#import <Foundation/Foundation.h>
#include <stdio.h>

int buf;
NSInteger intinput(void){
    scanf("%d",&buf);
    NSInteger ret = buf;
    return ret;
}

void output(NSString *s,NSString *sep){
    NSFileHandle *fileHandle = [NSFileHandle fileHandleWithStandardOutput];
    [fileHandle writeData:[s dataUsingEncoding:NSUTF8StringEncoding]];
    [fileHandle writeData:[sep dataUsingEncoding:NSUTF8StringEncoding]];
    [fileHandle closeFile];
}

NSMutableArray* to_numarray(NSString *s){
    NSMutableArray *l = [NSMutableArray arrayWithArray:[s componentsSeparatedByString:@" "]];
    NSInteger buf = 0;
    for(int i=0;i<[l count];i++){
        buf = [[l objectAtIndex:i] integerValue];
        [l replaceObjectAtIndex:i withObject:[NSNumber numberWithInteger:buf]];
    }
    return l;
}

int main(int argc, const char * argv[]) {
    NSInteger n = intinput();
    NSString *result = [NSString stringWithFormat:@"%ld",n*2];
    output(result,@"\n");
    return 0;
}

Submission Info

Submission Time
Task A - 流行
User tallestorange
Language Objective-C (Clang3.8.0)
Score 100
Code Size 1000 Byte
Status AC
Exec Time 113 ms
Memory 10844 KB

Compile Error

In file included from ./Main.m:1:
In file included from /usr/include/GNUstep/Foundation/Foundation.h:30:
In file included from /usr/include/GNUstep/GNUstepBase/GSVersionMacros.h:193:
/usr/include/GNUstep/GNUstepBase/GSConfig.h:393:13: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]
#    define __strong 
            ^
/usr/include/GNUstep/GNUstepBase/GSConfig.h:394:13: warning: ignoring redefinition of Objective-C qualifier macro [-Wobjc-macro-redefinition]
#    define __weak 
            ^
2 warnings generated.

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 28
Set Name Test Cases
All 00_sample_00.txt, max_1000000.txt, min_0.txt, rand_133007.txt, rand_171937.txt, rand_172717.txt, rand_232508.txt, rand_242450.txt, rand_246841.txt, rand_269046.txt, rand_320433.txt, rand_435534.txt, rand_50616.txt, rand_537196.txt, rand_565439.txt, rand_601980.txt, rand_622146.txt, rand_624081.txt, rand_678601.txt, rand_696476.txt, rand_762274.txt, rand_798714.txt, rand_821336.txt, rand_85323.txt, rand_859632.txt, rand_921203.txt, rand_934508.txt, rand_993594.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 113 ms 10844 KB
max_1000000.txt AC 19 ms 3376 KB
min_0.txt AC 19 ms 3376 KB
rand_133007.txt AC 19 ms 3376 KB
rand_171937.txt AC 19 ms 3376 KB
rand_172717.txt AC 19 ms 3376 KB
rand_232508.txt AC 19 ms 3376 KB
rand_242450.txt AC 18 ms 3376 KB
rand_246841.txt AC 19 ms 3376 KB
rand_269046.txt AC 18 ms 3376 KB
rand_320433.txt AC 19 ms 3380 KB
rand_435534.txt AC 19 ms 3376 KB
rand_50616.txt AC 18 ms 3376 KB
rand_537196.txt AC 19 ms 3376 KB
rand_565439.txt AC 19 ms 3376 KB
rand_601980.txt AC 19 ms 3376 KB
rand_622146.txt AC 19 ms 3376 KB
rand_624081.txt AC 19 ms 3376 KB
rand_678601.txt AC 19 ms 3376 KB
rand_696476.txt AC 19 ms 3376 KB
rand_762274.txt AC 19 ms 3376 KB
rand_798714.txt AC 19 ms 3376 KB
rand_821336.txt AC 18 ms 3376 KB
rand_85323.txt AC 19 ms 3376 KB
rand_859632.txt AC 19 ms 3376 KB
rand_921203.txt AC 18 ms 3376 KB
rand_934508.txt AC 19 ms 3376 KB
rand_993594.txt AC 19 ms 3376 KB