#include <iostream>usingnamespace std;
int main()
{
int a, b, c;
string s;
cin >> a;
cin >> b >> c;
cin >> s;
cout << a + b + c << " " << s;
}
TypeScriptでこの問題を解くと次のようになります。
import * as fs from'fs';const input = fs.readFileSync("/dev/stdin","utf8");const a = +input.split('\n')[0];const b = +input.split('\n')[1].split(' ')[0];const c = +input.split('\n')[1].split(' ')[1];const s = input.split('\n')[2];
console.log(`${a + b + c} ${s}`);
i Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
? Allow Firebase to collect CLI usage and error reporting information? Yes
i To change your data collection preference at any time, run `firebase logout` and log in again.
FirestoreやAutheticationを使用するためにFirebaseのプロジェクトを既に作成ずみなので、Use an existing projectを選択します。
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option:
Use an existing project
Create a new project
❯ Add Firebase to an existing Google Cloud Platform project
Don't set up a default project
Use an existing projectを選択した後に、Firebaseプロジェクトの一覧が表示されるので、該当のプロジェクトを選択します。(今回はtaikinプロジェクトを選択する)
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option: Use an existing project
? Select a default Firebase project for this directory: taikin (taikin)
i Using project taikin (taikin)
=== Hosting Setup
Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.
? What do you want to use as your public directory?
最後に、SPAアプリケーションかどうか質問されるので、YESと回答します。
? Configure as a single-page app (rewrite all urls to /index.html)? Yes