首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
myming
2024年7月20日 16:03
十进制和二进制 题解:
P1176
回复 0
|
赞 9
|
浏览 880
#include <bits/stdc++.h> using namespace std; // 将十进制字符串转换为二进制字符串 void decimalToBinary(char a[], char binary[]) { int len = strlen(a); int k = 0; while (len > 0) { binary[k++] = ((a[len - 1] - '0') % 2...
tuzhi
2024年6月28日 10:54
十进制和二进制 题解:
P1176
回复 1
|
赞 6
|
浏览 956
visual studio上运行编译都可以,不知道为什么这里说不行…… #include<iostream> #include<cstring> #include<cmath> #include<stdio.h> using namespace std; int main() { int n; while (cin >> n) { &...
Candour
2024年6月16日 18:39
十进制和二进制(Py秒了,巨坑:多组测试输入题目没说) 题解:
P1176
回复 0
|
赞 10
|
浏览 2.8k
大数问题直接py while True: try: a = int(input()) a = format(a, 'b') b = a[::-1] b = int(b, 2) print(b) except: break
等等
2024年4月12日 18:03
十进制和二进制 50%通过率,有大佬可以帮忙看看吗
P1176
回复 2
|
赞 13
|
浏览 1.8k
#include<bits/stdc++.h> using namespace std; int main() { char a[200],buf[200]; int b[200]; while(cin>>a){ int len=strlen(a); ...
Kohi
2024年3月17日 18:55
十进制和二进制 题解:
P1176
回复 1
|
赞 1
|
浏览 1.2k
#include <bits/stdc++.h> using namespace std; string division(string s, const int &from, const int &to, int &remain){ remain = 0; for(int i = 0; i < s.size(); i++){ int temp = remain * from + s[i] - '0'; ...
testzzz666
2024年3月22日 20:45
java
P1176
回复 0
|
赞 0
|
浏览 706
import java.math.BigInteger; import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sr = new Scanner(System.in); while (sr.hasNext()) { // 这个n是你输入的10进制数 BigInteger n; ...
渐鸿于陆
2024年3月22日 18:01
十进制和二进制 题解:还是写不出来
P1176
回复 2
|
赞 4
|
浏览 1.0k
#include<stdio.h> #include<string.h> char s[1005]; int arr[1005]; int ans[5000]; int convert(int arr[],int ans[],int len){ int j,num=0,i = 0,k = 0; int quotient,reminder; while(i<len){ ...
acd131415
2024年3月19日 16:40
十进制和二进制 题解:是不是长整型溢出了啊
P1176
回复 1
|
赞 0
|
浏览 828
#include<iostream> #include<queue> #include<stack> using namespace std; stack<int> queue1; void bin(int n){ if(n==1){queue1.push(1);return;} else{ queue1.push(n%2); &nbs...
渐鸿于陆
2024年3月17日 15:30
十进制和二进制 题解:用了 long long int,AC50%.应
P1176
回复 1
|
赞 2
|
浏览 1.0k
#include"stdio.h" #include"string.h" int main(void){ int ans; long long int n; char s[105]; while(scanf("%lld",&n) != EOF){ ans = 0; &n...
damowanghwj
2024年3月12日 13:27
十进制和二进制 题解:实现了二进制字符串转化为十进制字符串 但依旧还是
P1176
回复 2
|
赞 1
|
浏览 1.0k
#include <iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> using namespace std; int CharToInt(char c){ int w = c-'0'; return w; } char IntToChar(int n){ char c = n + '0...
1
2
3
4
题目
十进制和二进制
题解数量
34
发布题解
在线答疑
热门题解
1
十进制和二进制 题解:
2
十进制和二进制 题解:
3
十进制和二进制 题解:手工求模,求乘算模拟
4
十进制和二进制 题解:纯粹的c语言解法
5
十进制和二进制 题解:
6
十进制和二进制 50%通过率,有大佬可以帮忙看看吗
7
十进制和二进制(Py秒了,巨坑:多组测试输入题目没说) 题解:
8
十进制和二进制 题解:
9
大数可以py的还是得学啊,cpp写哭了
10
十进制和二进制 题解:C