travel to place where there is snow. Make lots of money upgrade knowledge buy all favourite things. buy bike or car forget her. Rediscover the lost one. You the best Vijay i know your the best.
Category Archives: Uncategorized
reporting to myself
Hi vijaykanth reddy people call you vijay but your vijaykanth. That’s not fine to short your name. will try to correct it. And today we had fun , we drove car so fast as we liked and we enjoyed driving. And it really nice meet grand parents. tomorrow time to make our self commander incharge. …
Time to be myself
hy I am telling this to myself after thinking about a girls happiness for 2 years. when it started it was not that intense it was fun but when you helping someone and they continue to need your help and you don’t want to hurt them and nothing make sense without seeing her happy then …
I tried a lot to optmize
Question available in my posts I couldn’t optimize it used 2 buffers but still same timing out using System; using System.Collections.Generic; using System.IO;using System.Linq; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ int total=int.Parse(Console.ReadLine()); for(int i=0;i<total;i++){ string str=Console.ReadLine(); int number=int.Parse(str.Split(‘ ‘)[0]); int m=int.Parse(str.Split(‘ ‘)[1]); Console.WriteLine(calculate(number)%m); } } static Dictionary<int,long> buffer=new Dictionary<int,long>(); static Dictionary<int,int> buffer2=new Dictionary<int,int>(); static long calculate(int number){ return sigmat(number); } static int g(int n){ int i=0; bool sum=false; i=buffercheck2(n,ref sum); if(sum){ return i; } int sfOutput=sf(i); buffer2.Add(i,sfOutput); while(sfOutput!=n){ i++; sfOutput=sf(i); buffer2.Add(i,sfOutput); } return i; } static long sigmat(int n){ long sum=0; int buff=buffercheck(n,ref sum)+1; …
Tried to optimize with 2 buffers
but didn’t worked looks like I am using wrong libraries 😂🤣🤦♂️ using System; using System.Collections.Generic; using System.IO;using System.Linq; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ int total=int.Parse(Console.ReadLine()); for(int i=0;i<total;i++){ string str=Console.ReadLine(); int number=int.Parse(str.Split(‘ ‘)[0]); int m=int.Parse(str.Split(‘ ‘)[1]); Console.WriteLine(calculate(number)%m); } } static Dictionary<int,long> buffer=new Dictionary<int,long>(); static Dictionary<int,int> buffer2=new Dictionary<int,int>(); static long calculate(int number){ return sigmat(number); } static int g(int n){ int i=0; bool sum=false; i=buffercheck2(n,ref sum); if(sum){ return i; } int sfOutput=sf(i); buffer2.Add(i,sfOutput); while(sfOutput!=n){ i++; sfOutput=sf(i); buffer2.Add(i,sfOutput); } return i; } static long sigmat(int n){ long sum=0; int buff=buffercheck(n,ref sum)+1; for(int i=buff;i<=n;i++){ int sgval=sg(i); sum+=sgval; buffer.Add(i,sum); } return sum; …
I tried optimizing code with buffer
using System; using System.Collections.Generic; using System.IO;using System.Linq; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ int total=int.Parse(Console.ReadLine()); for(int i=0;i<total;i++){ string str=Console.ReadLine(); int number=int.Parse(str.Split(‘ ‘)[0]); int m=int.Parse(str.Split(‘ ‘)[1]); Console.WriteLine(calculate(number)%m); } } static Dictionary<int,long> buffer=new Dictionary<int,long>(); static long calculate(int number){ return sigmat(number); } static int g(int n){ int i=0; while(sf(i)!=n){ i++; } return i; } static long sigmat(int n){ long sum=0; int buff=buffercheck(n,ref sum)+1; for(int i=buff;i<=n;i++){ int sgval=sg(i); sum+=sgval; buffer.Add(i,sum); } return sum; } static int buffercheck(int n,ref long sum){ int max=0; for(int i=0;i<buffer.Count;i++){ if(max<=buffer.ElementAt(i).Key && buffer.ElementAt(i).Key <=n ){ max=buffer.ElementAt(i).Key; sum=buffer.ElementAt(i).Value; if(max==n) { return n; } } } return max; } static int sg(int n){ n=g(n); int sum=0; while(n>0){ sum+=n%10; n=n/10; } …
What am I doing
I really don’t know just trying to solve a problem This above question now time is 7:37 I took like 20min to understand 🤣😂 I haven’t had practice coding questions like this I am a web developer not a coding freek. my code solution for now is incomplete but let’s try this out using System;using System.Collections.Generic;using System.IO;class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ int total=int.Parse(Console.ReadLine()); for(int i=0;i<total;i++){ int number=int.Parse(Console.ReadLine().Split(‘ ‘)[0]); Console.WriteLine(calculate(number)); } } static int calculate(int number){ return f(number); } static int f(int n){ int sum=0; while(n>0){ sum+=n%10; n=n/10; } return sum; } } Draft …
I am not the best
my favorite song collection
ok it’s almost 4:30
I enjoyed the time. which means I haven’t learned or build anything till now. FIrlst of all I have to clean my laptop then I will start working on my projects.
I am a programmer
I can crate a website from scratch. I like building websites one of my favorite project that I use every time I feel sad is my diary project. it is highly secured and safe. http://dear-diary-hi.web.app/ if u like visit this website it is really good. I am building new websites over weekends. hope tomorrow I …