/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 364.0 KiB
#2 Wrong Answer 1ms 328.0 KiB

Code

#include <stdio.h>

int main() {
    int T;
    scanf("%d", &T);

    while (T--) {
        int B;
        scanf("%d", &B);

        
        if (B <= 1) {
            printf("-1\n");
        } else {
            
            int perimeter = B + B - 1 + (int)sqrt(B * B + (B - 1) * (B - 1));
            
            
            
            
            printf("%d\n", perimeter);
        }
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1027 Right triangle
Contest
Brain booster #2
Language
C99 (GCC 13.2.0)
Submit At
2024-03-06 16:06:44
Judged At
2024-11-11 03:41:26
Judged By
Score
0
Total Time
1ms
Peak Memory
364.0 KiB