io.afu.utils.Runner Maven / Gradle / Ivy
package io.afu.utils;
import io.afu.common.exception.BaseException;
import io.afu.httprequest.HttpRequest;
import io.afu.utils.encryption.RSAHelper;
import io.afu.utils.files.FileUtils;
import org.apache.commons.codec.binary.Base64;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.*;
/**
* @author RffanLAB.方露宇
* @version 0.1
*/
public class Runner {
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode pre = new ListNode(0);
ListNode current = pre;
int carry = 0 ;
while(l1 != null || l2 != null){
int l1num = l1!= null ? l1.val : 0;
int l2num = l2!= null ? l2.val : 0;
int sum = carry + l1num + l2num;
carry = sum / 10;
int left = sum % 10;
current.next = new ListNode(left);
current = current.next;
l1 = l1.next;
l2 = l2.next;
}
if(carry >0 ){
current.next = new ListNode(carry);
}
return pre.next;
}
public static void main(String[] args) throws BaseException, UnsupportedEncodingException {
int num = 0;
String target = "dvdf";
int len = target.length();
Map sub = new HashMap<>();
for (int i = 0 ;i();
sub.put(c,1);
}else {
sub.put(c,1);
}
}
if (num