# TimeVsBrightness

public class tesTing {
static int arr = {6,2,5,5,4,5,6,3,7,6};
static int Converter(int x){
int a = (int)(x/10);
int b= x-a10;
return arr[a]+arr[b];}
public static void main(String []args){
int B;int maxB = 0;int minB = 100;
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
B=Converter(i)+Converter(j)+Converter(k);
if(B>maxB){maxB = B;}
if(B<minB){minB = B;}}}}
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
if(Converter(i)+Converter(j)+Converter(k) ==maxB){
System.out.println(â€śBrightness {â€ť+maxB+"}"+"(highest)@"+i+":"+j+":"+k);}
if(Converter(i)+Converter(j)+Converter(k) ==minB){
System.out.println(â€śBrightness {â€ť+minB+"}"+"(lowest)@"+i+":"+j+":"+k);
}}}}}}[quote=â€śAbhinay_Singh, post:1, topic:156652, full:trueâ€ť]
public class tesTing {
static int [] arr = {6,2,5,5,4,5,6,3,7,6};
static int Converter(int x){
int a = (int)(x/10);
int b= x-a
10;
return arr[a]+arr[b];}
public static void main(String args){
int B;int maxB = 0;int minB = 100;
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
B=Converter(i)+Converter(j)+Converter(k);
if(B>maxB){maxB = B;}
if(B<minB){minB = B;}}}}
for (int i = 0; i<24;i++){
for(int j = 0; j<60;j++){
for (int k = 0;k<60;k++){
if(Converter(i)+Converter(j)+Converter(k) ==maxB){
System.out.println(â€śBrightness {â€ť+maxB+"}"+"(highest)@"+i+":"+j+":"+k);}
if(Converter(i)+Converter(j)+Converter(k) ==minB){
System.out.println(â€śBrightness {â€ť+minB+"}"+"(lowest)@"+i+":"+j+":"+k);
}}}}}}
[/quote]

What is your question? Also, please format your code to make it easier for others to read. . When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The â€śpreformatted textâ€ť tool in the editor (`</>`) will also add backticks around text.

1 Like