惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
Vercel News
Vercel News
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG

博客园 - 啊不才

【转载备用】Linux内核编译 幸运的Windows 7 Party 社区活动 jQueryinAction学习笔记——01 - 啊不才 - 博客园 django的字符替换问题 如何在屏幕中央打开一个特定的窗口 KB937061和KB947738多次安装问题 BlogEngine.Net的皮肤 [How Do I]系列学习笔记——001:学习一些技巧 继承类中override和new的区别 『框架设计(第2版)CLR Via C#』学习笔记——使用is和as操作符来进行强制类型转换 调用Master页面上的属性 NotePad++很好用,但是我真的不想再用它了 BlogEngine的SQL Server数据库配置 关于asp:ScriptManager与Script代码块的位置关系问题 NHiBernate学习笔记(1) 使用JMail.NET时遇到的问题 ToString()方法与Convert.ToString()的差异 『框架设计(第2版)CLR Via C#』学习笔记——常量 【已解决,看后文】使用BlogEngine.net的扩展插件Silverlight Player Extension遇到的问题
我提交的ACM题库的答案
啊不才 · 2008-07-05 · via 博客园 - 啊不才

最近园子里流行做俄罗斯乌拉尔大学在线题库我也就做了一下,下面是1000题和1001题的代码:
Problem 1000:

1int main()
2{
3    int a, b;
4    clrscr();
5    scanf("%d %d"&a, &b);
6    printf("%d", a+b);
7}

Problem 1001:

 1using System;
 2using System.Threading;
 3using System.Globalization;
 4
 5namespace ConsoleApplication4
 6{
 7    class Program
 8    {
 9        static void Main(string[] args)
10        {
11            // 注意下面一行代码,如果少了的话,你永远也通过不了,哈哈
12            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
13            string[] inputArray = Console.In.ReadToEnd().Split();
14            for (int i = inputArray.Length - 1; i >= 0; i--)
15            {
16                if (!String.IsNullOrEmpty(inputArray[i]))
17                {
18                    Console.WriteLine("{0:F4}", Math.Sqrt(Convert.ToDouble(inputArray[i])));
19                }

20            }

21        }

22    }

23}

原因是什么,在这里有人解释了,注意看回复的第二楼。