首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
等等
2024年4月12日 18:03
十进制和二进制 50%通过率,有大佬可以帮忙看看吗
P1176
回复 2
|
赞 15
|
浏览 2.4k
#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.7k
#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
|
浏览 1.1k
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
|
赞 5
|
浏览 1.6k
#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
|
浏览 1.3k
#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.6k
#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.4k
#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...
阿离
2024年3月2日 19:39
十进制和二进制 题解:这为什吗不对呀
P1176
回复 3
|
赞 1
|
浏览 1.6k
#include <bits/stdc++.h> using namespace std; int main(){ char s[105]; int n; int cnt=0,ans = 0; scanf("%d",&n); while(n>0){ ...
Arrobear
2024年1月2日 02:18
十进制和二进制 题解:C++的,不知道为什么有一半数据过不了,有没有大
P1176
回复 1
|
赞 2
|
浏览 1.7k
#include<bits/stdc++.h> using namespace std; int fun(int* m, int len) { int p = 0; for (int i = 0; i < len; i++) { if (m[i] != 0) p = 1;  ...
fxl
2023年8月9日 21:37
十进制和二进制 题解:
P1176
回复 0
|
赞 0
|
浏览 2.1k
while True: try: a = eval(input()) b = list() while a>0: b.append(a%2) a=a//2 ans=0 l = len(b) for i in range(l): ans = 2*ans + int(b[i]) print(ans) except: break
1
2
3
4
5
题目
十进制和二进制
题解数量
41
发布题解
在线答疑
热门题解
1
十进制和二进制 题解:居然写了一下午
2
十进制和二进制 题解:
3
十进制和二进制 题解:手工求模,求乘算模拟
4
十进制和二进制 题解:
5
十进制和二进制 题解:纯粹的c语言解法
6
十进制和二进制 题解:
7
十进制和二进制 题解:
8
十进制和二进制 题解:
9
大数可以py的还是得学啊,cpp写哭了
10
十进制和二进制 题解: