
#import <Foundation/Foundation.h>
 
int main(int argc, char * argv[]) {
    NSString * appDelegateClassName;
    @autoreleasepool {
        
        int A = 5;
        int B = 7;
        int N = 4;
        
        int sum = 0;
        int max = 0;
        int maxCount = 0;
        
        for (int i=1; i<N; i++){
            sum = floor(A*i/B) - 5 * floor(i/B);
            
            if (max <= sum) {
                max = sum;
            }
            maxCount = i;
        }
        
        NSLog(@"maxcount %d",maxCount);
        
        // Setup code that might create autoreleased objects goes here.
        appDelegateClassName = NSStringFromClass([AppDelegate class]);
    }
    return UIApplicationMain(argc, argv, nil, appDelegateClassName);
}
