当前位置:网站首页>9.Life, the Universe, and Everything
9.Life, the Universe, and Everything
2022-04-23 06:08:00 【linsa_ pursuer】
Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.
Example
Input:
1
2
88
42
99
Output:
1
2
88
package com;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner s = new Scanner(System.in);
while (s.hasNextInt()){
int n = s.nextInt();
if(n==42){
break;
}else{
System.out.println(n);
}
}
}
}
版权声明
本文为[linsa_ pursuer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220533259694.html
边栏推荐
- 去噪论文阅读——[CVPR2022]Blind2Unblind: Self-Supervised Image Denoising with Visible Blind Spots
- Complete example demonstration of creating table to page - joint table query
- Pyemd installation and simple use
- Pytoch -- data loading and processing
- Delete and truncate
- Multithreading and high concurrency (3) -- synchronized principle
- 线性代数第一章-行列式
- 图像恢复论文——[RED-Net, NIPS16]Image Restoration Using Very Deep Convolutional Encoder-Decoder Networks wi
- 常用编程记录——parser = argparse.ArgumentParser()
- Solve the error: importerror: iprogress not found Please update jupyter and ipywidgets
猜你喜欢
![去噪论文阅读——[CVPR2022]Blind2Unblind: Self-Supervised Image Denoising with Visible Blind Spots](/img/fd/84df62c88fe90a73294886642036a0.png)
去噪论文阅读——[CVPR2022]Blind2Unblind: Self-Supervised Image Denoising with Visible Blind Spots

CONDA virtual environment management (create, delete, clone, rename, export and import)

20 excellent plug-ins recommended by idea
![Reading of denoising papers - [cvpr2022] blind2blind: self supervised image denoising with visible blind spots](/img/fd/84df62c88fe90a73294886642036a0.png)
Reading of denoising papers - [cvpr2022] blind2blind: self supervised image denoising with visible blind spots

自动控制(韩敏版)

Linear algebra Chapter 2 - matrices and their operations

Pyqy5 learning (III): qlineedit + qtextedit

Opensips (1) -- detailed process of installing opensips

PyQy5学习(三):QLineEdit+QTextEdit

数字图像处理基础(冈萨雷斯)一
随机推荐
The user name and password of users in the domain accessing the samba server outside the domain are wrong
Treatment of tensorflow sequelae - simple example record torch utils. data. dataset. Picture dimension problem when rewriting dataset
Viewer: introduce MySQL date function
Understanding and use of tp50, tp90 and tp99
在Jupyter notebook中用matplotlib.pyplot出现服务器挂掉、崩溃的问题
Anaconda
Pytoch -- data loading and processing
Pytorch Learning record (XIII): Recurrent Neural Network
Algèbre linéaire chapitre 2 - matrice et son fonctionnement
Pytorch learning record (IV): parameter initialization
Pytorch learning record (III): structure of neural network + using sequential and module to define the model
What is the difference between the basic feasible solution and the basic feasible solution in linear programming?
线代第四章-向量组的线性相关
SQL optimization best practices
Chapter 4 of line generation - linear correlation of vector systems
Multithreading and high concurrency (2) -- detailed explanation of synchronized usage
JDBC operation transaction
Pytorch learning record (IX): convolutional neural network in pytorch
Pyqt5 learning (I): Layout Management + signal and slot association + menu bar and toolbar + packaging resource package
Why does the subscript of the array start from 0 instead of 1?