
Lv.1
签名:猫站已死 CCW 勿念
在 找可以教代码的师傅() 中回复
师傅不用找,关键先学JavaScript,
然后一些基础的概念(如四元数,向量等)也要学扎实
如果还不能理解,可以自己开个地图实践实践
加油,你可以哒

2022-05-04T20:41:52 点赞:2
在 【㵘】晒出你最早的消息 中回复
【前往恢复】:https://shequ.codemao.cn/work/30880588父亲节将至,我们为你准备的父亲节作品却被清空,请购买作品后尽快恢复
2022-07-14T21:44:23 点赞:0
在 [C++习题讲解] OJ3015 中回复
当然啦,也可以不用string头文件:
#include<iostream>
#include<cmath> // 需要用到pow函数
using namespace std;
int toBinary(int oct); // 将十进制转为二进制
int countOne(int input); // 数出数字1的个数
int main(){
long long input, output;
while(true){ // 用死循环监听输入
cin >> input;
if(input == 0) break;
output = toBinary(input);
cout << "The parity of " << output;
output = countOne(output);
cout << " is " << output << " (mod 2).\n";
}
return 0;
}
int toBinary(int input){
int output = 0, bit = 0; // bit是位置
int *numList = new int[70]; // 先定了70位(毕竟long long也只有64位)
for(; input != 0; bit ++){ // 先分解
numList[bit] = input % 2;
input = input / 2;
}
for(; bit >= 0; bit --){ // 后合并
output += pow(10, bit) * numList[bit];
}
delete[] numList;
return output;
}
int countOne(int input){
int output = 0;
while(input != 0){ // 这里更简单,不断除10就行
if(input % 2 == 1) output ++;
input /= 10;
}
return output;
}2022-10-06T11:02:25 点赞:0
在 【Kitten公测·源码画板更新】这次,你就是把图片放大N倍也绝不模糊! 中回复
感觉这个画板还是不太行......(sc专业户探头
矢量图就那几个,根本不够自由,要是能像sc3一样搞贝塞尔曲线(还是叫什么其它的?)就太棒啦
2023-03-02T21:38:07 点赞:3