团体程序设计天梯赛--5分题

L1-001 Hello World!

#include<bits/stdc++.h>
using namespace std;
int main(){
    cout<<"Hello World!";
    return 0;
}

L1-004 计算摄氏温度

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a;
    b=5*(a-32)/9;
    cout<<"Celsius = "<<b;
    return 0;
}

L1-012 计算指数

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,x;
    cin>>n;
    x=pow(2,n);
    cout<<"2^"<<n<<" = "<<x;
    return 0;
}

L1-014 简单题

#include<bits/stdc++.h>
using namespace std;
int main(){
    cout<<"This is a simple problem.";
    return 0;
}

L1-021 重要的话说三遍

#include<bits/stdc++.h>
using namespace std;
int main(){
     cout<<"I'm gonna WIN!\nI'm gonna WIN!\nI'm gonna WIN!\n";
    return 0;
}

L1-024 后天

#include<bits/stdc++.h>
using namespace std;
int main(){
    int d;
    cin>>d;
    if(d>=6)cout<<(d+2)%7;
    else cout<<d+2;
    return 0;
}

L1-026 I Love GPLT

#include<bits/stdc++.h>
using namespace std;
int main(){
      printf("I\n \nL\no\nv\ne\n \nG\nP\nL\nT");
    return 0;
}

L1-029 是不是太胖了

#include<bits/stdc++.h>
using namespace std;
int main(){
        int h;double w;
    cin>>h;
    w=(h-100)*0.9*2;
    printf("%.1f",w);
    return 0;
}

L1-036 A乘以B

#include<bits/stdc++.h>
using namespace std;
int main(){
      int a,b;
    cin>>a>>b;
    cout<<a*b;
    return 0;
}   

L1-038 新世界

#include<bits/stdc++.h>
using namespace std;
int main(){
        cout<<"Hello World\nHello New World";
    return 0;
}   

L1-042 日期格式化

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c;
    scanf("%d-%d-%d",&a,&b,&c);
    printf("%d-%02d-%02d",c,a,b);
    return 0;
}

L1-045 宇宙无敌大招呼

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    cout<<"Hello "<<s;
    return 0;
}

L1-051 打折

#include<bits/stdc++.h>
using namespace std;
int main(){
     double a,b;
    cin>>a>>b;
    printf("%.2f",a*b/10.0);
    return 0;
}

L1-052 2018我们要赢

#include<bits/stdc++.h>
using namespace std;
int main(){
     
    printf("2018\nwo3 men2 yao4 ying2 !");
    return 0;
}

L1-057 PTA使我精神焕发

#include<bits/stdc++.h>
using namespace std;
int main(){
    cout<<"PTA shi3 wo3 jing1 shen2 huan4 fa1 !";
    return 0;
}

L1-060 心理阴影面积

#include<bits/stdc++.h>
using namespace std;
int main(){
    int x,y;
    cin>>x>>y;
    cout<<5000-(x*y/2+(100-x)*(y+100)/2);
    return 0;
}

L1-065 嫑废话上代码

#include<bits/stdc++.h>
using namespace std;
int main(){
        cout<<"Talk is cheap. Show me the code.";
    return 0;
}   

L1-066 猫是液体

#include<bits/stdc++.h>
using namespace std;
int main(){
        int a,b,c;
    cin>>a>>b>>c;
    cout<<a*b*c;
    return 0;
}   

L1-073 人与神

#include<bits/stdc++.h>
using namespace std;
int main(){
    cout<<"To iterate is human, to recurse divine.";
    return 0;
}

L1-074 两小时学完C语言

#include<bits/stdc++.h>
using namespace std;
int main(){
     int a,b,c;
    cin>>a>>b>>c;
    a=a-b*c;
    cout<<a;
    return 0;
}

L1-081 今天我要赢

#include<bits/stdc++.h>
using namespace std;
int main(){
      cout<<"I'm gonna win! Today!\n2022-04-23";
    return 0;
}

L1-082 种钻石

#include<bits/stdc++.h>
using namespace std;
int main(){
       int a,b;
    cin>>a>>b;
    cout<<a/b;
    return 0;
}

L4-109 考试周

#include<bits/stdc++.h>
using namespace std;
int main(){
        int a,b;
    cin>>a>>b;
    printf("%d/%.1f=%d",a,b,a*1.0/b);
   return 0;
}

L4-114 自动编程

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    cout<<"print("<<n<<")";
    return 0;
}

L4-115 太神奇了

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<b+a-1;
    return 0;
}

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

星河欲转。

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值