2021-05-21

每日一练_02:

编写一个程序对输入的内容进行加密,也可以对输入的内容进行解密。

import java.util.*;
public class encryptionAndDecryption{
    public static void main(String args[]){
        System.out.println("Please enter the file you want to encrypt:");
        Scanner scanner = new Scanner(System.in);
        String password = scanner.nextLine();
        char secret = 'A';
        char []a = password.toCharArray();
        for(int i=0;i<a.length;i++){
            a[i]=(char)(a[i]^secret);
        }
        System.out.println("It is encrypted as shown below:");
        for(int i=0;i<a.length;i++){
            System.out.print(a[i]);
        }
        System.out.println("");
        System.out.println("enter what you want to decrypt:");
        String password2 = scanner.nextLine();
        char []b = password2.toCharArray();
        for(int i=0;i<b.length;i++){
            b[i]=(char)(b[i]^secret);
        }
        System.out.println("It is decrypted as shown below:");
        for(int i=0;i<b.length;i++){
            System.out.print(b[i]);
        }
    }
}

结果如下:

Please enter the file you want to encrypt:
十点进攻
It is encrypted as shown below:
匀烸辚敺
enter what you want to decrypt:
匀烸辚敺
It is decrypted as shown below:
十点进攻

大家好,今天编写的是大佬给本菜鸟的第二道编程题。结合了课本内容,抠jio完成,欢迎大家提出好的建议。

2021-03-26 20:54:33,596 - Model - INFO - Epoch 1 (1/200): 2021-03-26 20:57:40,380 - Model - INFO - Train Instance Accuracy: 0.571037 2021-03-26 20:58:16,623 - Model - INFO - Test Instance Accuracy: 0.718528, Class Accuracy: 0.627357 2021-03-26 20:58:16,623 - Model - INFO - Best Instance Accuracy: 0.718528, Class Accuracy: 0.627357 2021-03-26 20:58:16,623 - Model - INFO - Save model... 2021-03-26 20:58:16,623 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 2021-03-26 20:58:16,698 - Model - INFO - Epoch 2 (2/200): 2021-03-26 21:01:26,685 - Model - INFO - Train Instance Accuracy: 0.727947 2021-03-26 21:02:03,642 - Model - INFO - Test Instance Accuracy: 0.790858, Class Accuracy: 0.702316 2021-03-26 21:02:03,642 - Model - INFO - Best Instance Accuracy: 0.790858, Class Accuracy: 0.702316 2021-03-26 21:02:03,642 - Model - INFO - Save model... 2021-03-26 21:02:03,643 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 2021-03-26 21:02:03,746 - Model - INFO - Epoch 3 (3/200): 2021-03-26 21:05:15,349 - Model - INFO - Train Instance Accuracy: 0.781606 2021-03-26 21:05:51,538 - Model - INFO - Test Instance Accuracy: 0.803641, Class Accuracy: 0.738575 2021-03-26 21:05:51,538 - Model - INFO - Best Instance Accuracy: 0.803641, Class Accuracy: 0.738575 2021-03-26 21:05:51,539 - Model - INFO - Save model... 2021-03-26 21:05:51,539 - Model - INFO - Saving at log/classification/pointnet2_msg_normals/checkpoints/best_model.pth 我有类似于这样的一段txt文件,请你帮我写一段代码来可视化这些训练结果
02-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

是壮壮没错了丶

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

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

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

打赏作者

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

抵扣说明:

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

余额充值