题解 | #将真分数分解为埃及分数#

字符串分隔

http://www.nowcoder.com/practice/d9162298cb5a437aad722fccccaae8a7

import java.util.; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); while(input.hasNext()){ String string=input.nextLine(); int add0=string.length()%8==0?0:8-string.length()%8; for (int i = 0; i <add0 ; i++) { string=string+0; } for (int i = 0; i <string.length()/8 ; i++) { System.out.println(string.substring(i8,i*8+8)); } } } }

全部评论

相关推荐

zhch7:建议9✌️把学历加黑加粗,如果实在offer可能是觉得佬不会去
投了多少份简历才上岸
点赞 评论 收藏
分享
05-05 21:45
已编辑
广州大学 Java
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
06-27 20:15
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务