zoukankan      html  css  js  c++  java
  • JustOj 1486: Hello, world!

    题目描述
    This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numbers and output corresponding messages.
    输入
    The input will contain a list of positive integers separated by whitespaces(spaces, newlines, TABs). Please process to the end of file (EOF). The integers will be no less than 32.
    输出
    Output the corresponding message. Note there is NOT a newline character in the end of output.
    样例输入
    72 101 108 108 111 44
    32 119 111 114 108 100 33
    
    样例输出
    Hello, world!

    题解:整型转字符型
     1 #include <iostream>
     2 #include <algorithm>
     3 #include <cstring>
     4 #include <cstdio>
     5 #include <vector>
     6 #include <cstdlib>
     7 #include <iomanip>
     8 #include <cmath>
     9 #include <ctime>
    10 #include <map>
    11 #include <set>
    12 using namespace std;
    13 #define lowbit(x) (x&(-x))
    14 #define max(x,y) (x>y?x:y)
    15 #define min(x,y) (x<y?x:y)
    16 #define MAX 100000000000000000
    17 #define MOD 1000000007
    18 #define pi acos(-1.0)
    19 #define ei exp(1)
    20 #define PI 3.141592653589793238462
    21 #define INF 0x3f3f3f3f3f
    22 #define mem(a) (memset(a,0,sizeof(a)))
    23 typedef long long ll;
    24 ll gcd(ll a,ll b){
    25     return b?gcd(b,a%b):a;
    26 }
    27 const int N=2005;
    28 const int mod=1e9+7;
    29 char a;
    30 int main()
    31 {
    32     std::ios::sync_with_stdio(false);
    33     int n,t=0;
    34     while(cin>>n){
    35         a=(char)n;
    36         cout<<a;
    37     }
    38     return 0;
    39 }
     
  • 相关阅读:
    Docker 私有仓库高级配置
    Docker 私有仓库
    Docker Hub
    访问 Docker 仓库
    Docker 删除容器
    392. 判断子序列
    605. 种花问题
    122. 买卖股票的最佳时机 II
    121. 买卖股票的最佳时机
    406. 根据身高重建队列
  • 原文地址:https://www.cnblogs.com/wydxry/p/7266973.html
Copyright © 2011-2022 走看看