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 - 1151 solution in C

#include<stdio.h>
int main(){
    int N,i,n[100];
    scanf("%d", &N);
    
    n[0] = 0;
    n[1] = 1;
    
    for(i = 2; i < N; i++){
        n[i] = n[i-1] + n[i-2];
    }
    printf("0");
    for(i = 1; i < N; i++){
        printf(" %d", n[i]);
    }
    printf("
");
    return 0;
}
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 - 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 :: minecraft 21w14a bugs 
Java :: what is a literal in java 
Java :: how to pass string between activities android 
Java :: how to return list in java 
Java :: Java offer() 
Java :: arraylist how to add at 0 java 
Java :: Duplicate entry Exception 
Java :: hikari cp oracle jdbc configuration 
Java :: java initialise array in return 
Java :: code to determine distance and time in java 
Java :: findbyname in jpa 
Java :: quick select method for kth smallest element in java 
Java :: circular roation continous in android 
Java :: what is void in java 
Java :: pen default Mail Application in android studio java 
Java :: primefaces p:dataexporter encoding for pdf preProcessor 
Java :: Java Multiple element Annotations 
Java :: Java Protected Access Modifier package one 
Java :: java.util.concurrent.CancellationException showing in suggestion 
Java :: convert kotlin to java online 
Java :: class in java 
Java :: unicode in java 
Java :: @entity annotation in spring boot 
Java :: java enum values() 
Java :: how to be good at javasctript 
Java :: java get class by string name 
Java :: get image from resourcestream javafx 
Java :: spring amqp exchange not found 
Sql :: get database size mysql 
Sql :: continue in sql 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =