当前位置:网站首页>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
边栏推荐
- 深入理解去噪论文——FFDNet和CBDNet中noise level与噪声方差之间的关系探索
- Denoising paper - [noise2void, cvpr19] noise2void learning denoising from single noise images
- Pytoch -- data loading and processing
- Delete and truncate
- Pytorch学习记录(三):神经网络的结构+使用Sequential、Module定义模型
- umi官网yarn create @umijs/umi-app 报错:文件名、目录名或卷标语法不正确
- 对比学习论文——[MoCo,CVPR2020]Momentum Contrast for Unsupervised Visual Representation Learning
- Chapter 4 of line generation - linear correlation of vector systems
- Exception handling: grab and throw model
- Pytorch introduction notes - use a simple example to observe the output size of each layer of forward propagation
猜你喜欢
编程记录——图片旋转函数scipy.ndimage.rotate()的简单使用和效果观察
Pytoch -- data loading and processing
Preparedstatement prevents SQL injection
Pyqy5 learning (2): qmainwindow + QWidget + qlabel
Pyqt5 learning (I): Layout Management + signal and slot association + menu bar and toolbar + packaging resource package
PyTorch笔记——观察DataLoader&用torch构建LeNet处理CIFAR-10完整代码
JDBC connection database
Pytorch notes - complete code for linear regression & manual or automatic calculation of gradient code comparison
PyQt5学习(一):布局管理+信号和槽关联+菜单栏与工具栏+打包资源包
Pytorch——数据加载和处理
随机推荐
Treatment of tensorflow sequelae - simple example record torch utils. data. dataset. Picture dimension problem when rewriting dataset
PyQy5学习(二):QMainWindow+QWidget+QLabel
In depth understanding of the relationship between dncblevel and noise denoising in the paper
Pytorch learning record (V): back propagation + gradient based optimizer (SGD, adagrad, rmsporp, Adam)
Fundamentals of SQL: first knowledge of database and SQL - installation and basic introduction - Alibaba cloud Tianchi
在Jupyter notebook中用matplotlib.pyplot出现服务器挂掉、崩溃的问题
JDBC operation transaction
Ptorch learning record (XIII): recurrent neural network
A general U-shaped transformer for image restoration
线性代数第三章-矩阵的初等变换与线性方程组
On traversal of binary tree
Framework analysis 2 Source code - login authentication
Programming record - picture rotation function SciPy ndimage. Simple use and effect observation of rotate()
Pytorch Learning record (XIII): Recurrent Neural Network
Delete and truncate
Traitement des séquelles du flux de Tensor - exemple simple d'enregistrement de torche. Utils. Données. Dataset. Problème de dimension de l'image lors de la réécriture de l'ensemble de données
SQL injection
Filebrowser realizes private network disk
Rsync for file server backup
Numpy common function table sorting of data processing