#include<bits/stdc++.h> using namespace std; int main() { int tc,a[13]; scanf ("%d", &tc); printf ("Lumberjacks:\n"); while ( tc-- ) { for ( int i = 0; i < 10; i++ ) { scanf ("%d", &a [i]); } bool flag = true; if (a [0] > a [1]) flag =...
UVA-Solutions 11945 – Financial Management.
#include<bits/stdc++.h> using namespace std; int main() { int t; double d, sum; int j=0; scanf("%d",&t); while(t--) { sum = 0; for(int i=0; i<12; i++) { scanf("%lf",&d); sum = sum + d; } double avg = sum/12.00; printf("%d $",++j);...
UVA Problem 11970 Solution- Lucky Numbers
#include<bits/stdc++.h> using namespace std; int main() { long int N,X,r; int T,i,j=1; cin>>T; while(T--) { cin>>N; printf("Case %d:",j++); r=sqrt(N); for(i=r-1;i>0;i--) { X=N-i*i; if(X%i==0) cout<<" "<<X; }...
UVA Problem 11984 Solution – A Change in Thermal Unit solution
#include<bits/stdc++.h> using namespace std; int main() { double F,C,c,d; int tc,i; while(cin>>tc) { for(i=1;i<=tc;i++) { cin>>c>>d; F = 9*c/5+d; C = F*5/9; printf("Case %d: %.2lf\n",i,C); } } return 0; }...
UVA Problem 11988 Solution – Broken Keyboard
#include <bits/stdc++.h> #include <vector> using namespace std; char letters[100001]; int main() { int i; while ( scanf ("%s", &letters) != EOF ) { int l = strlen (letters); list <char>beiju; list <char>::iterator it =...
UVa : 11991 (Easy Problem from Rujia Liu?)
#include <cstdio> #include <vector> using namespace std; int main() { int n, m, N,V, k; vector<vector<int> > v; while (scanf("%d %d", &n, &m) != EOF) { v.assign(1000000, vector<int>()); for (int i = 1; i <= n;...
UVa Solution 12149 : Feynman
#include <bits/stdc++.h> using namespace std; int main() { int a,i,n,j,s; while(scanf("%d",&a)==1 && a>0) { s=0; for(i=1;i<=a;i++) s+=(i*i); cout<<s<<endl; } return 0; }...
Uva 12372 – Packing for Holiday
#include <bits/stdc++.h> using namespace std; int main() { int H,W,L,tc,c=1; cin>>tc; while(tc--) { cin>>L>>W>>H; printf("Case %d: ",c++); if(L<=20 and W<=20 and H<=20) cout<<"good"<<endl; else...
UVA Problem 12527 Solution – Different Digits
#include<stdio.h> int main() { int n,m,ro,a[20],num,i,j,digit,k,count; while(scanf("%d %d",&n,&m)==2) { ro=0; for(i=n;i<=m;i++) { num=i; digit=0; while(num>0) { a[digit++]=num%10; num/=10; } count=0; for(j=0;j<digit-1;j++) {...
UVA Problem 12854 – Automated Checking Machine Solution
#include <bits/stdc++.h> using namespace std; long int a[5],b[5]; int main() { bool flag; while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>b[0]>>b[1]>>b[2]>>b[3]>>b[4]) { flag=false; for(int...
UVA Problem 12895 Solution -Armstrong Number
#include <bits/stdc++.h> using namespace std; int main() { int num,tc,sum,j; vector<int>v; cin>>tc; while(tc--) { cin>>num; v.push_back(num); int tempo=num; int i=0; while(tempo) { v[i]=tempo%10; tempo/=10; i++; } for(sum = j...
UVA-Solutions 11677 (Alarm Clock)
#include <bits/stdc++.h> using namespace std; int main() { int h1,m1,h2,m2,hr,mr,tr; while(cin>>h1>>m1>>h2>>m2) { if(h1==0 && m1==0 && h2==0 && m2==0) break; hr=h2-h1; mr=m2-m1; tr=(hr*60)+mr;...
UVA Problem 10773 – Back to Intermediate Math
#include <bits/stdc++.h> using namespace std; int main() { double d,u,v,t1,t2; int count,n; cin>>n; count=1; while(n--) { cin>>d>>v>>u; if(u==0 ||v==0 ||u<=v) { printf("Case %d: can't determine\n",count); continue; } t1=d/u;...
UVA 11462 (Age sort) Solution
//UVA Problem 11462 Solution /** * @Author : Jesmin Akther */ #include <stdio.h> long int n, array[2000005], c, d, t; int main() { while(scanf("%ld", &n)==1 ) { if(n==0) break; for (c = 0; c < n; c++) { scanf("%ld", &array[c]); } for (c = 1 ; c <=...
Anticipating Python 3.14: Features, Performance & Data Science Trends for 2025
Get an early look at Python 3.14, slated for 2025! Explore expected features, performance boosts, and how it will shape Python development and data science.
Stay Ahead: Why Keeping Up with the Latest AI News and Trends is Crucial
The world of AI evolves at lightning speed. Discover why staying informed on the latest AI news, breakthroughs, and industry trends is essential for everyone.
Mastering the IELTS Speaking Test: Your Comprehensive Guide to an Impressive Score
Discover expert strategies and essential resources to ace the IELTS Speaking Test. Learn how to boost your fluency, vocabulary, and confidence for a top score.
Python’s Future: What to Expect in 2025 and Beyond for Developers & Data Scientists
Explore Python’s exciting future! Discover anticipated trends, innovations, and what upcoming releases like Python 3.13 and 3.14 mean for developers and data scientists.




