#include <iostream>
using namespace std;
string f(int seed) {
srand(seed);
string s;
while (true) {
int n = rand() % 20;
if (n == 15) break;
s.push_back((char) (n + 100));
}
return s;
}
int main() {
cout << f(41488932) + " " + f(24081743);
return 0;
}
忘了放运行结果,补上
1
pkokp8 2018-04-07 20:44:31 +08:00 via Android 1
1.论排版的重要性
2.那个循环有什么用,凑字数么 |
3
Xww 2018-04-07 21:27:19 +08:00 via Android
include<studio.h>
int main() { printf(“ Hello World!”); return 0; } 我觉得最简单的是最酷的~ |
4
scream7 2018-04-07 21:34:24 +08:00
好奇这两个种子怎么算出来的
|
7
DevRoss 2018-04-08 00:29:31 +08:00 via Android
汇编写一个
|
8
Kirscheis 2018-04-08 02:50:09 +08:00 via Android
日经骗铜币帖。。在外观上最好看的还是 brainfuck
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. @Xww studio->stdio (doge) |
10
jamweak 2018-04-08 10:10:09 +08:00
既然是花式输出,不如弄一个包含 “ Hello world ” 的二维码吧~
|
11
undefind 2018-04-08 10:16:01 +08:00
摩斯电码:
...././.-../.-../---/.--/---/.-./.-../-../-.-.-- |
12
sunwei0325 2018-04-08 15:59:12 +08:00
凯撒密码
|
13
hmzt 2018-04-08 16:26:57 +08:00
那么问题来了,怎样保证两台机器的随机序列相同呢(滑稽
|
14
marcong95 2018-04-08 17:51:16 +08:00
msg = ''
while msg != 'Hello, world!': msg = generate_random_string() print(msg) 思想出自知乎某网友的超算 demo 程序 |
17
firebroo 2018-04-10 12:29:48 +08:00
```c
#define _________ } #define ________ putchar #define _______ main #define _(a) ________(a); #define ______ _______(){ #define __ ______ _(0x48)_(0x65)_(0x6C)_(0x6C) #define ___ _(0x6F)_(0x2C)_(0x20)_(0x77)_(0x6F) #define ____ _(0x72)_(0x6C)_(0x64)_(0x21) #define _____ __ ___ ____ _________ #include<stdio.h> _____ ``` |